海底小纵队维基 octonautswiki https://octonauts.miraheze.org/wiki/%E9%A6%96%E9%A1%B5 MediaWiki 1.39.4 first-letter Media Special Talk User User talk 海底小纵队维基 海底小纵队维基 talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk 表单 表单讨论 Video Video talk Campaign Campaign talk TimedText TimedText talk Module Module talk CommentStreams CommentStreams Talk Template:Dated maintenance category 10 856 1687 2014-01-08T08:14:55Z wikipedia>John of Reading 0 Second attempt. Those spaces upset inline templates such as {{As of}}. Instead, try an unconditional <nowiki/> wikitext text/x-wiki <nowiki/><!--This nowiki helps to prevent whitespace at the top of articles-->{{#ifeq:{{FULLROOTPAGENAME}}|Wikipedia:Template messages|<!--Do not categorize-->|<!-- -->{{#ifexpr:{{#if:{{NAMESPACE}}|0|1}}+{{#ifeq:{{{onlyarticles|no}}}|yes|0|1}} |{{#if:{{{3|}}} |[[Category:{{{1}}} {{{2}}} {{{3}}}]]<!-- -->{{#ifexist:Category:{{{1}}} {{{2}}} {{{3}}} |<!-- -->|[[Category:Articles with invalid date parameter in template]]<!-- -->}} |[[Category:{{#if:{{{5|}}} |{{{5}}}<!-- -->|{{{1}}}<!-- -->}}]]<!-- -->}}{{#if:{{{4|}}} |[[Category:{{{4}}}]]}}<!-- -->}}<!-- -->}}<noinclude> {{documentation}} </noinclude> 41e7d4000124d4f718ddf222af0b72825048c4c4 Module:Namespace detect 828 936 1861 2014-04-05T17:01:23Z wikipedia>Mr. Stradivarius 0 use demopage instead of page as the main "page" parameter Scribunto text/plain --[[ -------------------------------------------------------------------------------- -- -- -- NAMESPACE DETECT -- -- -- -- This module implements the {{namespace detect}} template in Lua, with a -- -- few improvements: all namespaces and all namespace aliases are supported, -- -- and namespace names are detected automatically for the local wiki. The -- -- module can also use the corresponding subject namespace value if it is -- -- used on a talk page. Parameter names can be configured for different wikis -- -- by altering the values in the "cfg" table in -- -- Module:Namespace detect/config. -- -- -- -------------------------------------------------------------------------------- --]] local data = mw.loadData('Module:Namespace detect/data') local argKeys = data.argKeys local cfg = data.cfg local mappings = data.mappings local yesno = require('Module:Yesno') local mArguments -- Lazily initialise Module:Arguments local mTableTools -- Lazily initilalise Module:TableTools local ustringLower = mw.ustring.lower local p = {} local function fetchValue(t1, t2) -- Fetches a value from the table t1 for the first key in array t2 where -- a non-nil value of t1 exists. for i, key in ipairs(t2) do local value = t1[key] if value ~= nil then return value end end return nil end local function equalsArrayValue(t, value) -- Returns true if value equals a value in the array t. Otherwise -- returns false. for i, arrayValue in ipairs(t) do if value == arrayValue then return true end end return false end function p.getPageObject(page) -- Get the page object, passing the function through pcall in case of -- errors, e.g. being over the expensive function count limit. if page then local success, pageObject = pcall(mw.title.new, page) if success then return pageObject else return nil end else return mw.title.getCurrentTitle() end end -- Provided for backward compatibility with other modules function p.getParamMappings() return mappings end local function getNamespace(args) -- This function gets the namespace name from the page object. local page = fetchValue(args, argKeys.demopage) if page == '' then page = nil end local demospace = fetchValue(args, argKeys.demospace) if demospace == '' then demospace = nil end local subjectns = fetchValue(args, argKeys.subjectns) local ret if demospace then -- Handle "demospace = main" properly. if equalsArrayValue(argKeys.main, ustringLower(demospace)) then ret = mw.site.namespaces[0].name else ret = demospace end else local pageObject = p.getPageObject(page) if pageObject then if pageObject.isTalkPage then -- Get the subject namespace if the option is set, -- otherwise use "talk". if yesno(subjectns) then ret = mw.site.namespaces[pageObject.namespace].subject.name else ret = 'talk' end else ret = pageObject.nsText end else return nil -- return nil if the page object doesn't exist. end end ret = ret:gsub('_', ' ') return ustringLower(ret) end function p._main(args) -- Check the parameters stored in the mappings table for any matches. local namespace = getNamespace(args) or 'other' -- "other" avoids nil table keys local params = mappings[namespace] or {} local ret = fetchValue(args, params) --[[ -- If there were no matches, return parameters for other namespaces. -- This happens if there was no text specified for the namespace that -- was detected or if the demospace parameter is not a valid -- namespace. Note that the parameter for the detected namespace must be -- completely absent for this to happen, not merely blank. --]] if ret == nil then ret = fetchValue(args, argKeys.other) end return ret end function p.main(frame) mArguments = require('Module:Arguments') local args = mArguments.getArgs(frame, {removeBlanks = false}) local ret = p._main(args) return ret or '' end function p.table(frame) --[[ -- Create a wikitable of all subject namespace parameters, for -- documentation purposes. The talk parameter is optional, in case it -- needs to be excluded in the documentation. --]] -- Load modules and initialise variables. mTableTools = require('Module:TableTools') local namespaces = mw.site.namespaces local cfg = data.cfg local useTalk = type(frame) == 'table' and type(frame.args) == 'table' and yesno(frame.args.talk) -- Whether to use the talk parameter. -- Get the header names. local function checkValue(value, default) if type(value) == 'string' then return value else return default end end local nsHeader = checkValue(cfg.wikitableNamespaceHeader, 'Namespace') local aliasesHeader = checkValue(cfg.wikitableAliasesHeader, 'Aliases') -- Put the namespaces in order. local mappingsOrdered = {} for nsname, params in pairs(mappings) do if useTalk or nsname ~= 'talk' then local nsid = namespaces[nsname].id -- Add 1, as the array must start with 1; nsid 0 would be lost otherwise. nsid = nsid + 1 mappingsOrdered[nsid] = params end end mappingsOrdered = mTableTools.compressSparseArray(mappingsOrdered) -- Build the table. local ret = '{| class="wikitable"' .. '\n|-' .. '\n! ' .. nsHeader .. '\n! ' .. aliasesHeader for i, params in ipairs(mappingsOrdered) do for j, param in ipairs(params) do if j == 1 then ret = ret .. '\n|-' .. '\n| <code>' .. param .. '</code>' .. '\n| ' elseif j == 2 then ret = ret .. '<code>' .. param .. '</code>' else ret = ret .. ', <code>' .. param .. '</code>' end end end ret = ret .. '\n|-' .. '\n|}' return ret end return p a4757000273064f151f0f22dc0e139092e5ff443 Template:Hatnote 10 897 1775 2014-05-23T15:55:04Z wikipedia>SMcCandlish 0 tweak wikitext text/x-wiki <includeonly>{{#invoke:Hatnote|hatnote}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 4a1d1028d07c9056022807a96051e1c82cf2a1c7 Module:Ns has subpages 828 859 1693 2014-12-10T06:37:29Z wikipedia>Mr. Stradivarius 0 Protected Module:Ns has subpages: [[WP:High-risk templates|High-risk Lua module]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) Scribunto text/plain -- This module implements [[Template:Ns has subpages]]. -- While the template is fairly simple, this information is made available to -- Lua directly, so using a module means that we don't have to update the -- template as new namespaces are added. local p = {} function p._main(ns, frame) -- Get the current namespace if we were not passed one. if not ns then ns = mw.title.getCurrentTitle().namespace end -- Look up the namespace table from mw.site.namespaces. This should work -- for a majority of cases. local nsTable = mw.site.namespaces[ns] -- Try using string matching to get the namespace from page names. -- Do a quick and dirty bad title check to try and make sure we do the same -- thing as {{NAMESPACE}} in most cases. if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then local nsStripped = ns:gsub('^[_%s]*:', '') nsStripped = nsStripped:gsub(':.*$', '') nsTable = mw.site.namespaces[nsStripped] end -- If we still have no match then try the {{NAMESPACE}} parser function, -- which should catch the remainder of cases. Don't use a mw.title object, -- as this would increment the expensive function count for each new page -- tested. if not nsTable then frame = frame or mw.getCurrentFrame() local nsProcessed = frame:callParserFunction('NAMESPACE', ns) nsTable = nsProcessed and mw.site.namespaces[nsProcessed] end return nsTable and nsTable.hasSubpages end function p.main(frame) local ns = frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns, frame) return hasSubpages and 'yes' or '' end return p e133068ba73738b16e1e3eba47735516a461eb5b Template:Spaces 10 866 1707 2015-10-25T11:38:26Z wikipedia>Edokter 0 use class wikitext text/x-wiki <span class="nowrap">{{#iferror:{{#expr:{{{1|1}}}}} |{{#switch:{{{1}}} |fig=&#8199; |en=&ensp; |em=&emsp; |thin=&thinsp; |hair=&#8202; |&nbsp; }} |{{#invoke:String|rep|{{#switch:{{{2}}} |fig=&#8199; |en=&ensp; |em=&emsp; |thin=&thinsp; |hair=&#8202; |&nbsp; }}|{{{1|1}}}}} }}</span><noinclude> {{documentation}} </noinclude> a9ed762825e7579f15dcb9b171b0c1c3bf524b3f Template:Str left 10 962 1925 2016-09-30T07:01:19Z wikipedia>Ymblanter 0 Changed protection level of Template:Str left: [[WP:High-risk templates|Highly visible template]]: RFPP request ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki <includeonly>{{safesubst:padleft:|{{{2|1}}}|{{{1}}}}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 2048b0d7b35e156528655b1d090e8b5ffab3f400 Template:Section link 10 964 1929 2017-01-17T01:29:39Z wikipedia>Primefac 0 done wikitext text/x-wiki {{#invoke:Section link|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 8d047e5845f8a9b74a4655b5dd79ca7595a8f88b Template:Navbar 10 81 1773 2017-04-22T18:49:17Z wikipedia>Plastikspork 0 Closed wikitext text/x-wiki <includeonly>{{#invoke:Navbar|navbar}}</includeonly><noinclude> {{documentation}} </noinclude> 868e3566b7e8a9a5a7f3dac75cac429c47de10d3 Template:Yesno-no 10 892 1761 2018-02-13T20:27:17Z wikipedia>WOSlinker 0 separate pp-template not needed wikitext text/x-wiki {{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1ad7b7800da1b867ead8f6ff8cef76e6201b3b56 Template:TemplateDataHeader 10 916 1823 2018-02-23T16:30:31Z wikipedia>Primefac 0 Changed protection level for "[[Template:TemplateDataHeader]]": [[WP:HIGHRISK|high-risk]] template with 4000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki #REDIRECT [[Template:TemplateData header]] {{R from move}} 61e461016bcb3a0a6fc4d8aea35d590298c19630 Template:Tag 10 900 1789 2018-07-26T17:17:13Z wikipedia>SMcCandlish 0 These are called attributes; no one who does HTML calls them "parameters". wikitext text/x-wiki <code class="{{#ifeq:{{{wrap|}}}|yes|wrap|nowrap}}" style="{{#ifeq:{{{style|}}}|plain|border:none;background:transparent;|{{{style|}}}}}"><!-- Opening tag -->{{#switch:{{{2|pair}}} |c|close = |e|empty|s|single|v|void |o|open |p|pair = &lt;{{#if:{{{link|}}}|[[HTML element#{{{1|tag}}}|{{{1|tag}}}]]|{{{1|tag}}}}}{{#if:{{{params|{{{attribs|}}}}}}|&#32;{{{params|{{{attribs}}}}}}}} }}<!-- Content between tags -->{{#switch:{{{2|pair}}} |c|close = {{{content|}}} |e|empty|s|single|v|void = &#32;&#47;&gt; |o|open = &gt;{{{content|}}} |p|pair = {{#ifeq:{{{1|tag}}}|!--||&gt;}}{{{content|...}}} }}<!-- Closing tag -->{{#switch:{{{2|pair}}} |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:{{{1|tag}}}|!--|--&gt;|&lt;&#47;{{{1|tag}}}&gt;}} }}<!-- --></code><noinclude> {{Documentation}} </noinclude> eae208bc1612c834de697fa3ee9b343966cf8602 Template:Infobox 10 957 1915 2018-08-15T18:33:36Z wikipedia>Primefac 0 Undid revision 855063393 by [[Special:Contributions/Jdlrobson|Jdlrobson]] ([[User talk:Jdlrobson|talk]]) rather problematic change mentioned [[Template_talk:Infobox#Using_template_styles_to_reduce_technical_debt_inside_mobile_skin|on talk page]], reverting until it can be sorted wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Template:Oldid 10 898 1785 2018-12-10T20:41:24Z wikipedia>Jonesey95 0 rm stray trailing space, per talk page request wikitext text/x-wiki <span class="plainlinks">[{{fullurl:{{{page|{{{1|Main Page}}}}}}|oldid={{{oldid|{{{2|}}}}}}}} {{{label|{{{title|{{{3|{{#if:{{{oldid|{{{2|}}}}}}|Old revision|Current version}} of {{#if:{{{page|{{{1|}}}}}}|'''{{{page|{{{1}}}}}}'''|a page}}}}}}}}}}}]</span><noinclude> {{documentation}} </noinclude> 4a42ae0cc77ec0385d4b6508c5d3f366db39ecdb Template:Template other 10 868 1711 2018-12-16T22:06:25Z wikipedia>Amorymeltzer 0 Changed protection level for "[[Template:Template other]]": [[WP:High-risk templates|Highly visible template]]: Transclusion count has increased dramatically ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Module:Color contrast 828 894 1765 2019-01-06T22:38:25Z wikipedia>Johnuniq 0 fix unintended color2lum global error which is causing errors; clean whitespace Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 1e399769117591366a63f62996c9a407077cc711 Template:FULLBASEPAGENAME 10 905 1801 2019-01-07T15:38:13Z wikipedia>Bsherr 0 bypassing redirect, removing excess white space wikitext text/x-wiki {{#if: {{Ns has subpages | {{#if:{{{1|}}}|{{NAMESPACE:{{{1}}}}}|{{NAMESPACE}}}} }} | {{#if: {{#titleparts:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}|-1}} | {{#titleparts:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}|-1}} | {{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}} }} | {{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}} }}<noinclude> {{documentation}} </noinclude> a21f32ffc20eab6d41631b3fb8af4c63e153a6c3 Module:Color contrast/colors 828 895 1767 2019-01-24T12:30:11Z wikipedia>Galobtter 0 Changed protection level for "[[Module:Color contrast/colors]]": [[WP:High-risk templates|High-risk Lua module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } 6ae47fdb24de4eed5ec26d203faf5341a388987b Template:Mbox templates (small) 10 976 1953 2019-02-15T16:20:44Z wikipedia>Frietjes 0 wikitext text/x-wiki <includeonly>{{Infobox | bodyclass = nowrap | bodystyle = width:auto;padding-bottom:0.6em;line-height:1.25em; | abovestyle = font-size:inherit; | above = Message box<br/>meta-templates | labelstyle = margin:0;padding:0 0.3em 0;text-align:center;font-weight:normal; | datastyle = margin:0;padding:0 0.5em 0 0; | label1 = ''template'' | data1 = ''context'' | label2 = {{tl|Ambox}} | data2 = article | label3 = {{tl|Cmbox}} | data3 = category | label4 = {{tl|Imbox}} | data4 = image | label5 = {{tl|Tmbox}} | data5 = talk | label6 = {{tl|Fmbox}} | data6 = footer / header | label7 = {{tl|Ombox}} | data7 = other pages | label8 = {{tl|Mbox}} | data8 = auto-detect | label9 = {{tl|Asbox}} | data9 = article stub | label10 = {{tl|Dmbox}} | data10 = disambiguation }}</includeonly><noinclude> {{Documentation}} </noinclude> 0b3ecac37228509c27b7b87ac29255ffde9ae20b Template:Lua 10 912 1815 2019-03-20T22:04:45Z wikipedia>RMCD bot 0 Removing notice of move discussion wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Template:Clc 10 913 1817 2019-04-24T04:30:59Z wikipedia>JJMC89 0 actual template is in the category wikitext text/x-wiki #REDIRECT [[Template:Category link with count]] 02280e2ab57b544236e11f913e3759c5781ca9d5 Template:Ombox 10 943 1875 2020-04-01T06:12:36Z MusikAnimal 37 1 revision imported wikitext text/x-wiki {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0e54065432d540737b9e56c4e3a8e7f74d4534ea Module:Arguments 828 837 1673 2020-04-01T06:12:40Z MusikAnimal 37 1 revision imported Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Category handler 828 935 1859 2020-04-01T06:12:40Z MusikAnimal 37 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- -- -- CATEGORY HANDLER -- -- -- -- This module implements the {{category handler}} template in Lua, -- -- with a few improvements: all namespaces and all namespace aliases -- -- are supported, and namespace names are detected automatically for -- -- the local wiki. This module requires [[Module:Namespace detect]] -- -- and [[Module:Yesno]] to be available on the local wiki. It can be -- -- configured for different wikis by altering the values in -- -- [[Module:Category handler/config]], and pages can be blacklisted -- -- from categorisation by using [[Module:Category handler/blacklist]]. -- -- -- -------------------------------------------------------------------------------- -- Load required modules local yesno = require('Module:Yesno') -- Lazily load things we don't always need local mShared, mappings local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function trimWhitespace(s, removeBlanks) if type(s) ~= 'string' then return s end s = s:match('^%s*(.-)%s*$') if removeBlanks then if s ~= '' then return s else return nil end else return s end end -------------------------------------------------------------------------------- -- CategoryHandler class -------------------------------------------------------------------------------- local CategoryHandler = {} CategoryHandler.__index = CategoryHandler function CategoryHandler.new(data, args) local obj = setmetatable({ _data = data, _args = args }, CategoryHandler) -- Set the title object do local pagename = obj:parameter('demopage') local success, titleObj if pagename then success, titleObj = pcall(mw.title.new, pagename) end if success and titleObj then obj.title = titleObj if titleObj == mw.title.getCurrentTitle() then obj._usesCurrentTitle = true end else obj.title = mw.title.getCurrentTitle() obj._usesCurrentTitle = true end end -- Set suppression parameter values for _, key in ipairs{'nocat', 'categories'} do local value = obj:parameter(key) value = trimWhitespace(value, true) obj['_' .. key] = yesno(value) end do local subpage = obj:parameter('subpage') local category2 = obj:parameter('category2') if type(subpage) == 'string' then subpage = mw.ustring.lower(subpage) end if type(category2) == 'string' then subpage = mw.ustring.lower(category2) end obj._subpage = trimWhitespace(subpage, true) obj._category2 = trimWhitespace(category2) -- don't remove blank values end return obj end function CategoryHandler:parameter(key) local parameterNames = self._data.parameters[key] local pntype = type(parameterNames) if pntype == 'string' or pntype == 'number' then return self._args[parameterNames] elseif pntype == 'table' then for _, name in ipairs(parameterNames) do local value = self._args[name] if value ~= nil then return value end end return nil else error(string.format( 'invalid config key "%s"', tostring(key) ), 2) end end function CategoryHandler:isSuppressedByArguments() return -- See if a category suppression argument has been set. self._nocat == true or self._categories == false or ( self._category2 and self._category2 ~= self._data.category2Yes and self._category2 ~= self._data.category2Negative ) -- Check whether we are on a subpage, and see if categories are -- suppressed based on our subpage status. or self._subpage == self._data.subpageNo and self.title.isSubpage or self._subpage == self._data.subpageOnly and not self.title.isSubpage end function CategoryHandler:shouldSkipBlacklistCheck() -- Check whether the category suppression arguments indicate we -- should skip the blacklist check. return self._nocat == false or self._categories == true or self._category2 == self._data.category2Yes end function CategoryHandler:matchesBlacklist() if self._usesCurrentTitle then return self._data.currentTitleMatchesBlacklist else mShared = mShared or require('Module:Category handler/shared') return mShared.matchesBlacklist( self.title.prefixedText, mw.loadData('Module:Category handler/blacklist') ) end end function CategoryHandler:isSuppressed() -- Find if categories are suppressed by either the arguments or by -- matching the blacklist. return self:isSuppressedByArguments() or not self:shouldSkipBlacklistCheck() and self:matchesBlacklist() end function CategoryHandler:getNamespaceParameters() if self._usesCurrentTitle then return self._data.currentTitleNamespaceParameters else if not mappings then mShared = mShared or require('Module:Category handler/shared') mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData end return mShared.getNamespaceParameters( self.title, mappings ) end end function CategoryHandler:namespaceParametersExist() -- Find whether any namespace parameters have been specified. -- We use the order "all" --> namespace params --> "other" as this is what -- the old template did. if self:parameter('all') then return true end if not mappings then mShared = mShared or require('Module:Category handler/shared') mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData end for ns, params in pairs(mappings) do for i, param in ipairs(params) do if self._args[param] then return true end end end if self:parameter('other') then return true end return false end function CategoryHandler:getCategories() local params = self:getNamespaceParameters() local nsCategory for i, param in ipairs(params) do local value = self._args[param] if value ~= nil then nsCategory = value break end end if nsCategory ~= nil or self:namespaceParametersExist() then -- Namespace parameters exist - advanced usage. if nsCategory == nil then nsCategory = self:parameter('other') end local ret = {self:parameter('all')} local numParam = tonumber(nsCategory) if numParam and numParam >= 1 and math.floor(numParam) == numParam then -- nsCategory is an integer ret[#ret + 1] = self._args[numParam] else ret[#ret + 1] = nsCategory end if #ret < 1 then return nil else return table.concat(ret) end elseif self._data.defaultNamespaces[self.title.namespace] then -- Namespace parameters don't exist, simple usage. return self._args[1] end return nil end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- Used for testing purposes. return { CategoryHandler = CategoryHandler } end function p._main(args, data) data = data or mw.loadData('Module:Category handler/data') local handler = CategoryHandler.new(data, args) if handler:isSuppressed() then return nil end return handler:getCategories() end function p.main(frame, data) data = data or mw.loadData('Module:Category handler/data') local args = require('Module:Arguments').getArgs(frame, { wrappers = data.wrappers, valueFunc = function (k, v) v = trimWhitespace(v) if type(k) == 'number' then if v ~= '' then return v else return nil end else return v end end }) return p._main(args, data) end return p b74dd63857b24904ac452429b11213f18647471f Module:Category handler/config 828 940 1869 2020-04-01T06:12:40Z MusikAnimal 37 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- [[Module:Category handler]] configuration data -- -- Language-specific parameter names and values can be set here. -- -- For blacklist config, see [[Module:Category handler/blacklist]]. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Start configuration data -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Parameter names -- -- These configuration items specify custom parameter names. -- -- To add one extra name, you can use this format: -- -- -- -- foo = 'parameter name', -- -- -- -- To add multiple names, you can use this format: -- -- -- -- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, -- -------------------------------------------------------------------------------- cfg.parameters = { -- The nocat and categories parameter suppress -- categorisation. They are used with Module:Yesno, and work as follows: -- -- cfg.nocat: -- Result of yesno() Effect -- true Categorisation is suppressed -- false Categorisation is allowed, and -- the blacklist check is skipped -- nil Categorisation is allowed -- -- cfg.categories: -- Result of yesno() Effect -- true Categorisation is allowed, and -- the blacklist check is skipped -- false Categorisation is suppressed -- nil Categorisation is allowed nocat = 'nocat', categories = 'categories', -- The parameter name for the legacy "category2" parameter. This skips the -- blacklist if set to the cfg.category2Yes value, and suppresses -- categorisation if present but equal to anything other than -- cfg.category2Yes or cfg.category2Negative. category2 = 'category2', -- cfg.subpage is the parameter name to specify how to behave on subpages. subpage = 'subpage', -- The parameter for data to return in all namespaces. all = 'all', -- The parameter name for data to return if no data is specified for the -- namespace that is detected. other = 'other', -- The parameter name used to specify a page other than the current page; -- used for testing and demonstration. demopage = 'page', } -------------------------------------------------------------------------------- -- Parameter values -- -- These are set values that can be used with certain parameters. Only one -- -- value can be specified, like this: -- -- -- -- cfg.foo = 'value name' -- -- -------------------------------------------------------------------------------- -- The following settings are used with the cfg.category2 parameter. Setting -- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2 -- is present but equal to anything other than cfg.category2Yes or -- cfg.category2Negative then it supresses cateogrisation. cfg.category2Yes = 'yes' cfg.category2Negative = '¬' -- The following settings are used with the cfg.subpage parameter. -- cfg.subpageNo is the value to specify to not categorise on subpages; -- cfg.subpageOnly is the value to specify to only categorise on subpages. cfg.subpageNo = 'no' cfg.subpageOnly = 'only' -------------------------------------------------------------------------------- -- Default namespaces -- -- This is a table of namespaces to categorise by default. The keys are the -- -- namespace numbers. -- -------------------------------------------------------------------------------- cfg.defaultNamespaces = { [ 0] = true, -- main [ 6] = true, -- file [ 12] = true, -- help [ 14] = true, -- category [100] = true, -- portal [108] = true, -- book } -------------------------------------------------------------------------------- -- Wrappers -- -- This is a wrapper template or a list of wrapper templates to be passed to -- -- [[Module:Arguments]]. -- -------------------------------------------------------------------------------- cfg.wrappers = 'Template:Category handler' -------------------------------------------------------------------------------- -- End configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line. 373cd107b13a5b00e6a1b7e66a749f12502c849d Module:Category handler/data 828 939 1867 2020-04-01T06:12:41Z MusikAnimal 37 1 revision imported Scribunto text/plain -- This module assembles data to be passed to [[Module:Category handler]] using -- mw.loadData. This includes the configuration data and whether the current -- page matches the title blacklist. local data = require('Module:Category handler/config') local mShared = require('Module:Category handler/shared') local blacklist = require('Module:Category handler/blacklist') local title = mw.title.getCurrentTitle() data.currentTitleMatchesBlacklist = mShared.matchesBlacklist( title.prefixedText, blacklist ) data.currentTitleNamespaceParameters = mShared.getNamespaceParameters( title, mShared.getParamMappings() ) return data abbc68048ff698e88dda06b64ecf384bbf583120 Module:Category handler/shared 828 941 1871 2020-04-01T06:12:41Z MusikAnimal 37 1 revision imported Scribunto text/plain -- This module contains shared functions used by [[Module:Category handler]] -- and its submodules. local p = {} function p.matchesBlacklist(page, blacklist) for i, pattern in ipairs(blacklist) do local match = mw.ustring.match(page, pattern) if match then return true end end return false end function p.getParamMappings(useLoadData) local dataPage = 'Module:Namespace detect/data' if useLoadData then return mw.loadData(dataPage).mappings else return require(dataPage).mappings end end function p.getNamespaceParameters(titleObj, mappings) -- We don't use title.nsText for the namespace name because it adds -- underscores. local mappingsKey if titleObj.isTalkPage then mappingsKey = 'talk' else mappingsKey = mw.site.namespaces[titleObj.namespace].name end mappingsKey = mw.ustring.lower(mappingsKey) return mappings[mappingsKey] or {} end return p d2d5de1a031e6ce97c242cbfa8afe7a92cb9eca5 Module:Namespace detect/config 828 938 1865 2020-04-01T06:12:44Z MusikAnimal 37 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Namespace detect configuration data -- -- -- -- This module stores configuration data for Module:Namespace detect. Here -- -- you can localise the module to your wiki's language. -- -- -- -- To activate a configuration item, you need to uncomment it. This means -- -- that you need to remove the text "-- " at the start of the line. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Parameter names -- -- These configuration items specify custom parameter names. Values added -- -- here will work in addition to the default English parameter names. -- -- To add one extra name, you can use this format: -- -- -- -- cfg.foo = 'parameter name' -- -- -- -- To add multiple names, you can use this format: -- -- -- -- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'} -- -------------------------------------------------------------------------------- ---- This parameter displays content for the main namespace: -- cfg.main = 'main' ---- This parameter displays in talk namespaces: -- cfg.talk = 'talk' ---- This parameter displays content for "other" namespaces (namespaces for which ---- parameters have not been specified): -- cfg.other = 'other' ---- This parameter makes talk pages behave as though they are the corresponding ---- subject namespace. Note that this parameter is used with [[Module:Yesno]]. ---- Edit that module to change the default values of "yes", "no", etc. -- cfg.subjectns = 'subjectns' ---- This parameter sets a demonstration namespace: -- cfg.demospace = 'demospace' ---- This parameter sets a specific page to compare: cfg.demopage = 'page' -------------------------------------------------------------------------------- -- Table configuration -- -- These configuration items allow customisation of the "table" function, -- -- used to generate a table of possible parameters in the module -- -- documentation. -- -------------------------------------------------------------------------------- ---- The header for the namespace column in the wikitable containing the list of ---- possible subject-space parameters. -- cfg.wikitableNamespaceHeader = 'Namespace' ---- The header for the wikitable containing the list of possible subject-space ---- parameters. -- cfg.wikitableAliasesHeader = 'Aliases' -------------------------------------------------------------------------------- -- End of configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line. 0e4ff08d13c4b664d66b32c232deb129b77c1a56 Module:Namespace detect/data 828 937 1863 2020-04-01T06:12:45Z MusikAnimal 37 1 revision imported Scribunto text/plain -------------------------------------------------------------------------------- -- Namespace detect data -- -- This module holds data for [[Module:Namespace detect]] to be loaded per -- -- page, rather than per #invoke, for performance reasons. -- -------------------------------------------------------------------------------- local cfg = require('Module:Namespace detect/config') local function addKey(t, key, defaultKey) if key ~= defaultKey then t[#t + 1] = key end end -- Get a table of parameters to query for each default parameter name. -- This allows wikis to customise parameter names in the cfg table while -- ensuring that default parameter names will always work. The cfg table -- values can be added as a string, or as an array of strings. local defaultKeys = { 'main', 'talk', 'other', 'subjectns', 'demospace', 'demopage' } local argKeys = {} for i, defaultKey in ipairs(defaultKeys) do argKeys[defaultKey] = {defaultKey} end for defaultKey, t in pairs(argKeys) do local cfgValue = cfg[defaultKey] local cfgValueType = type(cfgValue) if cfgValueType == 'string' then addKey(t, cfgValue, defaultKey) elseif cfgValueType == 'table' then for i, key in ipairs(cfgValue) do addKey(t, key, defaultKey) end end cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more. end local function getParamMappings() --[[ -- Returns a table of how parameter names map to namespace names. The keys -- are the actual namespace names, in lower case, and the values are the -- possible parameter names for that namespace, also in lower case. The -- table entries are structured like this: -- { -- [''] = {'main'}, -- ['wikipedia'] = {'wikipedia', 'project', 'wp'}, -- ... -- } --]] local mappings = {} local mainNsName = mw.site.subjectNamespaces[0].name mainNsName = mw.ustring.lower(mainNsName) mappings[mainNsName] = mw.clone(argKeys.main) mappings['talk'] = mw.clone(argKeys.talk) for nsid, ns in pairs(mw.site.subjectNamespaces) do if nsid ~= 0 then -- Exclude main namespace. local nsname = mw.ustring.lower(ns.name) local canonicalName = mw.ustring.lower(ns.canonicalName) mappings[nsname] = {nsname} if canonicalName ~= nsname then table.insert(mappings[nsname], canonicalName) end for _, alias in ipairs(ns.aliases) do table.insert(mappings[nsname], mw.ustring.lower(alias)) end end end return mappings end return { argKeys = argKeys, cfg = cfg, mappings = getParamMappings() } d224f42a258bc308ef3ad8cc8686cd7a4f47d005 Module:Yesno 828 848 1671 2020-04-01T06:27:55Z MusikAnimal 37 Undid revision 948472533 by [[Special:Contributions/w>Vogone|w>Vogone]] ([[User talk:w>Vogone|talk]]) Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:File link 828 874 1725 2020-04-01T06:31:54Z MusikAnimal 37 Undid revision 948472508 by [[Special:Contributions/w>IPad365|w>IPad365]] ([[User talk:w>IPad365|talk]]) Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Template:Sandbox other 10 901 1791 2020-04-03T00:08:09Z wikipedia>Evad37 0 Also match subpage names beginning with "sandbox", per [[Template_talk:Sandbox_other#Template-protected_edit_request_on_28_March_2020|edit request]] wikitext text/x-wiki {{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> 91e4ae891d6b791615152c1fbc971414961ba872 Template:Tlf 10 903 1797 2020-04-13T14:42:57Z wikipedia>Primefac 0 Primefac moved page [[Template:Tlf]] to [[Template:Template link with link off]]: full name to indicate what it does wikitext text/x-wiki #REDIRECT [[Template:Template link with link off]] {{Redirect category shell| {{R from move}} }} 52759e1d3f7c9aa4a03d0b7d4f84f4c6adf53edf Template:Template link with alternate text 10 968 1937 2020-04-13T14:54:11Z wikipedia>Primefac 0 Primefac moved page [[Template:Tla]] to [[Template:Template link with alternate text]]: full name for clarity wikitext text/x-wiki {{Tlg|subst={{{subst|}}}|nowrap={{{nowrap|}}}|{{{1|}}}<!-- -->|alttext{{#ifeq:{{{2}}}|{{{2|x}}}||x}}={{{2}}}<!-- -->|3{{#ifeq:{{{3}}}|{{{3|x}}}||x}}={{{3}}}<!-- -->|4{{#ifeq:{{{4}}}|{{{4|x}}}||x}}={{{4}}}<!-- -->|5{{#ifeq:{{{5}}}|{{{5|x}}}||x}}={{{5}}}<!-- -->|6{{#ifeq:{{{6}}}|{{{6|x}}}||x}}={{{6}}}<!-- -->|7{{#ifeq:{{{7}}}|{{{7|x}}}||x}}={{{7}}}<!-- -->|8{{#ifeq:{{{8}}}|{{{8|x}}}||x}}={{{8}}}<!-- -->|9{{#ifeq:{{{9}}}|{{{9|x}}}||x}}={{{9}}}<!-- -->|10{{#ifeq:{{{10}}}|{{{10|x}}}||x}}={{{10}}}<!-- -->|11{{#ifeq:{{{11}}}|{{{11|x}}}||x}}={{{11}}}<!-- -->|12{{#ifeq:{{{12}}}|{{{12|x}}}||x}}={{{12}}}}}<noinclude> {{Documentation}} </noinclude> 7caf0bb11d2f63149bfc961432b7cf4a05b02cad Template:Tla 10 969 1939 2020-04-13T14:54:11Z wikipedia>Primefac 0 Primefac moved page [[Template:Tla]] to [[Template:Template link with alternate text]]: full name for clarity wikitext text/x-wiki #REDIRECT [[Template:Template link with alternate text]] {{Redirect category shell| {{R from move}} }} 5705a62c7a5cc85e5377bd4b550ebeb0cc5b10fa Module:Category handler/blacklist 828 942 1873 2020-04-18T08:48:05Z wikipedia>Jo-Jo Eumerus 0 Per category talk page Scribunto text/plain -- This module contains the blacklist used by [[Module:Category handler]]. -- Pages that match Lua patterns in this list will not be categorised unless -- categorisation is explicitly requested. return { '^Main Page$', -- don't categorise the main page. -- Don't categorise the following pages or their subpages. -- "%f[/\0]" matches if the next character is "/" or the end of the string. '^Wikipedia:Cascade%-protected items%f[/\0]', '^User:UBX%f[/\0]', -- The userbox "template" space. '^User talk:UBX%f[/\0]', -- Don't categorise subpages of these pages, but allow -- categorisation of the base page. '^Wikipedia:Template index/.*$', -- Don't categorise archives. '/[aA]rchive', "^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$", } 87469d7a9ef2a3c41b2bf04ae18f7c59a18fb855 Template:Sidebar 10 870 1717 2020-06-04T02:43:13Z wikipedia>Primefac 0 TFD closed as keep ([[WP:XFDC|XFDcloser]]) wikitext text/x-wiki {{#invoke:Sidebar|sidebar}}<noinclude> {{documentation}}</noinclude> ab2498000a99daf324f656b0badd187b4a3e2b42 Module:String 828 863 1701 2020-08-02T15:49:42Z wikipedia>RexxS 0 separate annotations for str.match from those for str._match Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The fist index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 6df794dd52434e0f6a372c9918f5a9dedd15f579 Template:Em 10 959 1919 2020-08-09T23:17:35Z wikipedia>Bsherr 0 /* top */as found, replacing [[Template:Tld]] with [[Template:Tlc]] or adding/updating category placement comments, plus general and typo fixes wikitext text/x-wiki <em {{#if:{{{role|}}}|role="{{{role}}}"}} {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</em><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> e2fac6fb507a0dd72c4e79d02403049c7d857c8d Template:Yesno 10 860 1695 2020-08-28T03:15:17Z Xaosflux 40 add additional paramerters, "t", "f" - requested on talk - worked in sandbox /testcases wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> 629c2937bc5cf7cfe13cd2a598582af832782399 Module:Effective protection level 828 873 1723 2020-09-29T03:38:47Z wikipedia>Jackmcbarn 0 bring in changes from sandbox Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 70256a489edf6be9808031b14a7e3ef3e025da97 Module:For 828 896 1769 2020-11-02T22:29:56Z wikipedia>Andrybak 0 don't add talk pages and pages in the user namespace to [[:Category:Hatnote templates with errors]] – this is similar to [[Special:Diff/953627233/986768317|Module:Other uses of]] and [[Special:Diff/967664662|Module:Hatnote]] Scribunto text/plain local mArguments --initialize lazily local mHatlist = require('Module:Hatnote list') local mHatnote = require('Module:Hatnote') local yesNo = require('Module:Yesno') local p = {} --Implements {{For}} from the frame --uses capitalized "For" to avoid collision with Lua reserved word "for" function p.For (frame) mArguments = require('Module:Arguments') return p._For(mArguments.getArgs(frame)) end --Implements {{For}} but takes a manual arguments table function p._For (args) local use = args[1] if (not use) then return mHatnote.makeWikitextError( 'no context parameter provided. Use {{other uses}} for "other uses" hatnotes.', 'Template:For#Errors', args.category ) end local pages = {} function two (a, b) return a, b, 1 end --lets us run ipairs from 2 for k, v in two(ipairs(args)) do table.insert(pages, v) end local title = mw.title.getCurrentTitle() local skipCat = title.isTalkPage or title.namespace == 2 --don't categorise talk pages and userspace local oddCat = skipCat and '' or '[[Category:Hatnote templates using unusual parameters]]' local category = yesNo(args.category) return mHatnote._hatnote( mHatlist.forSeeTableToString({{use = use, pages = pages}}), {selfref = args.selfref} ) .. ( (use == 'other uses') and ((category == true) or (category == nil)) and oddCat or '' ) end return p 2faf1bd8c657f3425af829cbde9733a936d8d4f4 Module:Documentation/styles.css 828 840 1783 2020-11-19T20:21:58Z wikipedia>Izno 0 Changed protection level for "[[Module:Documentation/styles.css]]": actually match module ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb Template:Tlg 10 970 1941 2020-11-20T18:19:26Z wikipedia>Primefac 0 Primefac moved page [[Template:Tlg]] to [[Template:Template link general]]: clearer name wikitext text/x-wiki #REDIRECT [[Template:Template link general]] {{Redirect category shell| {{R from move}} }} 707ce913a3ffa8193c9377c3ded7db7b72407500 Template:Tlx 10 843 1907 2020-11-20T18:53:35Z wikipedia>Primefac 0 Primefac moved page [[Template:Tlx]] to [[Template:Template link expanded]] over redirect: expand name, make it more obvious wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] {{Redirect category shell| {{R from move}} }} 1fec988ceb46cb324af228aac45d7cd25fcc9008 Template:Template link expanded 10 842 1909 2020-11-21T12:04:41Z wikipedia>Primefac 0 update wikitext text/x-wiki {{#Invoke:Template link general|main|code=on}}<noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlx}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 6c99696fee02f1da368ed20d2504e19bc15b1c13 Template:Template link with link off 10 902 1795 2020-11-21T12:06:17Z wikipedia>Primefac 0 update wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nowrap=yes|nolink=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlf}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> b099fea5d1f36b0b4b9cb253ad3a9f4e095f6851 Template:Block indent/styles.css 10 956 1913 2020-12-27T21:05:41Z wikipedia>Izno 0 pp sanitized-css text/css /* {{pp|small=yes}} */ .block-indent { padding-left: 3em; padding-right: 0; overflow: hidden; } c89721fb334bfbd775783b44641a3466b6748d6b Template:Block indent 10 955 1911 2020-12-27T21:23:56Z wikipedia>Izno 0 templatestyles for block indent wikitext text/x-wiki <templatestyles src="Block indent/styles.css"/><div class="block-indent {{{class|}}}" {{#if:{{{left|}}}{{{em|}}}{{{right|}}}{{{style|}}}|style="{{#if:{{{left|{{{em|}}}}}}|padding-left: {{{left|{{{em}}}}}}em;}}{{#if:{{{right|}}}|padding-right: {{{right}}}em;}}{{#if:{{{style|}}}|{{{style}}}}}"}}>{{{1|{{{text|{{{content|{{{quote|<noinclude>{{lorem ipsum}}</noinclude><includeonly>{{error|Error: No content given to indent (or equals sign used in the actual argument to an unnamed parameter)}}</includeonly>}}}}}}}}}}}}</div><noinclude> {{documentation}} </noinclude> f1e4d04c02e97bfe86521e96e8265e947e574340 Template:Tl 10 32 1675 2021-02-12T22:03:00Z wikipedia>Anthony Appleyard 0 Anthony Appleyard moved page [[Template:Tl]] to [[Template:Template link]]: [[Special:Permalink/1006428669|Requested]] by Buidhe at [[WP:RM/TR]]: RM closed as move wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Redirect category shell| {{R from move}} }} d6593bb3b4a866249f55d0f34b047a71fe1f1529 Template:Template link general 10 967 1935 2021-02-20T18:40:07Z Pppery 34 Make substable per edit request wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:Template link general|main}}<noinclude> {{Documentation}} </noinclude> 9871d2f490eaedd832a0ae8016adbf807ddf7b71 Template:Template link 10 841 1677 2021-03-25T19:03:22Z wikipedia>Izno 0 [[Wikipedia:Templates for discussion/Log/2021 March 18#Template:Tlu]] closed as keep ([[WP:XFDC#4.0.11|XFDcloser]]) wikitext text/x-wiki &#123;&#123;[[Template:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> eabbec62efe3044a98ebb3ce9e7d4d43c222351d Template:Lua sidebar/styles.css 10 920 1831 2021-04-24T04:27:37Z wikipedia>Izno 0 max-width sanitized-css text/css .lua-sidebar { width: auto; max-width: 22em; } 9984d36eb49fae70dd00527c993784d775409a6b Template:Endplainlist 10 899 1787 2021-05-14T07:01:30Z wikipedia>WOSlinker 0 fix lint wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{documentation|Template:Plainlist/doc}} </noinclude> d545c41582328dd4f197e2b1848c8ad7392b92e0 Template:Category link with count 10 914 1819 2021-06-11T18:13:44Z wikipedia>GKFX 0 Support wider range of (valid) input format wikitext text/x-wiki [[:Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|<!-- -->{{#if:{{{name|}}}|{{{name}}}|Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}}}<!-- -->]]&nbsp;({{PAGESINCATEGORY:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|{{{2|all}}}}})<noinclude> {{Documentation}} </noinclude> f93f1540b8c157703bd6d24ae35c35bef745981d Template:Navbox 10 79 1669 2021-06-26T18:05:09Z wikipedia>Trialpears 0 Remove TfD notice as it wouldn't involve any changes to this template. wikitext text/x-wiki <includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude> {{Documentation}} </noinclude> fe9b964401f895918ee4fe078678f1722a3c41ec Module:Hatnote/styles.css 828 877 1731 2021-07-12T19:22:27Z wikipedia>Izno 0 per my talk page sanitized-css text/css /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Template:For 10 893 1763 2021-07-17T12:58:12Z wikipedia>Plastikspork 0 [[Wikipedia:Templates for discussion/Log/2021 July 8#Template:For]] closed as do not merge ([[WP:XFDC#4.0.12|XFDcloser]]) wikitext text/x-wiki <includeonly>{{#invoke:For|For}}</includeonly><noinclude> {{Documentation}} </noinclude> 3f70c0fa7cd736071e7c6e7dcd90ff3704df26bb Template:Template parameter usage 10 908 1807 2021-08-21T18:02:56Z wikipedia>SUM1 0 Added missing "lc" parameters; added optional "based" parameter to add text "based on this[/its] TemplateData" at end of template wikitext text/x-wiki {{#switch:{{{label|}}} |=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|C|c}}lick here] to see a monthly parameter usage report for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|this template}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} |for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|[[Template:{{ROOTPAGENAME}}]]}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |#default=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{{label|}}}]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} }}<noinclude> {{documentation}} </noinclude> b9cdd1b2e409313904f041c38562a3d6221cc017 Template:TemplateData header 10 907 1805 2021-08-29T21:32:29Z wikipedia>SUM1 0 Added "based" parameter to other transclusion wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- noheader: -->{{Template parameter usage|based=y}}|<!-- +header: -->This is the {{#if:{{{nolink|}}}|<!-- +header, nolink TD -->TemplateData|<!-- +header, +link [[TD]]; DEFAULT: -->[[Wikipedia:TemplateData|TemplateData]]}}<!-- e.o. #if:nolink; DEFAULT: --> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|based=y}}<!-- e.o. #if:noheader -->}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div><includeonly><!-- check parameters -->{{#invoke:Check for unknown parameters|check |unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}} |template=Template:TemplateData header |1 |nolink |noheader |preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Template:TemplateData header]].</div> }}<!-- -->{{template other|{{sandbox other|| [[Category:Templates using TemplateData]] }}}}</includeonly><!-- --><noinclude>{{Documentation}}</noinclude> ddfbb4ae793846b96d4c06330417fa6ed4da2adc Module:Redirect 828 854 1683 2021-09-10T07:46:37Z wikipedia>Johnuniq 0 restore p.getTargetFromText which is used by [[Module:RfD]] which is causing "Lua error in Module:RfD at line 87: attempt to call upvalue 'getTargetFromText' (a nil value)" Scribunto text/plain -- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redirect. function p.getTargetFromText(text) local target = string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]" ) or string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]" ) return target and mw.uri.decode(target, 'PATH') end -- Gets the target of a redirect. If the page specified is not a redirect, -- returns nil. function p.getTarget(page, fulltext) -- Get the title object. Both page names and title objects are allowed -- as input. local titleObj if type(page) == 'string' or type(page) == 'number' then titleObj = getTitle(page) elseif type(page) == 'table' and type(page.getContent) == 'function' then titleObj = page else error(string.format( "bad argument #1 to 'getTarget'" .. " (string, number, or title object expected, got %s)", type(page) ), 2) end if not titleObj then return nil end local targetTitle = titleObj.redirectTarget if targetTitle then if fulltext then return targetTitle.fullText else return targetTitle.prefixedText end else return nil end end --[[ -- Given a single page name determines what page it redirects to and returns the -- target page name, or the passed page name when not a redirect. The passed -- page name can be given as plain text or as a page link. -- -- Returns page name as plain text, or when the bracket parameter is given, as a -- page link. Returns an error message when page does not exist or the redirect -- target cannot be determined for some reason. --]] function p.luaMain(rname, bracket, fulltext) if type(rname) ~= "string" or not rname:find("%S") then return nil end bracket = bracket and "[[%s]]" or "%s" rname = rname:match("%[%[(.+)%]%]") or rname local target = p.getTarget(rname, fulltext) local ret = target or rname ret = getTitle(ret) if ret then if fulltext then ret = ret.fullText else ret = ret.prefixedText end return bracket:format(ret) else return nil end end -- Provides access to the luaMain function from wikitext. function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) return p.luaMain(args[1], args.bracket, args.fulltext) or '' end -- Returns true if the specified page is a redirect, and false otherwise. function p.luaIsRedirect(page) local titleObj = getTitle(page) if not titleObj then return false end if titleObj.isRedirect then return true else return false end end -- Provides access to the luaIsRedirect function from wikitext, returning 'yes' -- if the specified page is a redirect, and the blank string otherwise. function p.isRedirect(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) if p.luaIsRedirect(args[1]) then return 'yes' else return '' end end return p a224c45940343d66f49a78b0a39b2045e2c45d20 Template:PAGENAMETDOC 10 922 1835 2021-09-19T22:49:59Z wikipedia>JJMC89 bot III 0 Moving [[:Category:Wikipedia variable-like templates]] to [[:Category:Wikipedia magic word templates]] per [[Wikipedia:Categories for discussion/Log/2021 September 11#Category:Wikipedia variable-like templates]] wikitext text/x-wiki {{#ifeq:{{#invoke:String|find|{{FULLPAGENAME}}|/sandbox%d*$|plain=false}}|0|{{{{#if:{{{1|}}}||FULL}}BASEPAGENAME}}|{{{{#if:{{{1|}}}||FULL}}PAGENAME}}}}<noinclude> {{Documentation|content= This template returns the current {{Tlx|FULLBASEPAGENAME}}, unless the title ends in <code>/sandbox</code> plus any number of digits, in which case it returns the {{tlx|FULLPAGENAME}}. It is primarily meant for demonstrating the sandbox version of templates in their documentation. This template takes one numbered parameter (<code>1</code>); if anything is in this parameter then it will return <code>&#123;&#123;BASEPAGENAME&#125;&#125;</code> and <code>&#123;&#123;PAGENAME&#125;&#125;</code>, which have no namespace prefix. }} [[Category:Wikipedia magic word templates]] </noinclude> ae0c3ac1a7415671c46f970d5faad2fd708640b0 Module:Sidebar/styles.css 828 890 1757 2021-09-20T01:15:45Z wikipedia>Goszei 0 self-rv, it's a little tight sanitized-css text/css /* {{pp-template}} */ /* TODO: Invert width design to be "mobile first" */ .sidebar { /* TODO: Ask if we should have max-width 22em instead */ width: 22em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ margin: 0.5em 0 1em 1em; background: #f8f9fa; border: 1px solid #aaa; padding: 0.2em; text-align: center; line-height: 1.4em; font-size: 88%; border-collapse: collapse; /* Timeless has display: none on .nomobile at mobile resolutions, so we * unhide it with display: table and let precedence and proximity win. */ display: table; } /* Unfortunately, so does Minerva desktop, except Minerva drops an * !important on the declaration. So we have to be mean for Minerva users. * Mobile removes the element entirely with `wgMFRemovableClasses` in * https://github.com/wikimedia/operations-mediawiki-config/blob/master/ wmf-config/InitialiseSettings.php#L16992 * which is why displaying it categorically with display: table works. * We don't really want to expose the generic user in the wild on mobile to have * to deal with sidebars. (Maybe the ones with collapsible lists, so that * might be an improvement. That is blocked on [[:phab:T111565]].) */ body.skin-minerva .sidebar { display: table !important; /* also, minerva is way too aggressive about other stylings on tables. * TODO remove when this template gets moved to a div. plans on talk page. * We always float right on Minerva because that's a lot of extra CSS * otherwise. */ float: right !important; margin: 0.5em 0 1em 1em !important; } .sidebar-subgroup { width: 100%; margin: 0; border-spacing: 0; } .sidebar-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-none { float: none; clear: both; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-outer-title { padding: 0 0.4em 0.2em; font-size: 125%; line-height: 1.2em; font-weight: bold; } .sidebar-top-image { padding: 0.4em; } .sidebar-top-caption, .sidebar-pretitle-with-top-image, .sidebar-caption { padding: 0.2em 0.4em 0; line-height: 1.2em; } .sidebar-pretitle { padding: 0.4em 0.4em 0; line-height: 1.2em; } .sidebar-title, .sidebar-title-with-pretitle { padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; } .sidebar-title-with-pretitle { padding: 0.1em 0.4em; } .sidebar-image { padding: 0.2em 0.4em 0.4em; } .sidebar-heading { padding: 0.1em 0.4em; } .sidebar-content { padding: 0 0.5em 0.4em; } .sidebar-content-with-subgroup { padding: 0.1em 0.4em 0.2em; } .sidebar-above, .sidebar-below { padding: 0.3em 0.8em; font-weight: bold; } .sidebar-collapse .sidebar-above, .sidebar-collapse .sidebar-below { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; } .sidebar-navbar { text-align: right; font-size: 115%; padding: 0 0.4em 0.4em; } .sidebar-list-title { padding: 0 0.4em; text-align: left; font-weight: bold; line-height: 1.6em; font-size: 105%; } /* centered text with mw-collapsible headers is finicky */ .sidebar-list-title-c { padding: 0 0.4em; text-align: center; margin: 0 3.3em; } @media (max-width: 720px) { /* users have wide latitude to set arbitrary width and margin :( "Super-specific" selector to prevent overriding this appearance by lower level sidebars too */ body.mediawiki .sidebar { width: 100% !important; clear: both; float: none !important; /* Remove when we div based; Minerva is dumb */ margin-left: 0 !important; margin-right: 0 !important; } /* TODO: We might consider making all links wrap at small resolutions and then * only introduce nowrap at higher resolutions. Do when we invert the media * query. */ } 7d621b35a37807a103b59075851fe36201204ceb Module:Unsubst 828 952 1901 2021-10-08T18:22:16Z wikipedia>Trappist the monk 0 sync from sandbox; see [[Module_talk:Unsubst#template_invocation_name_override|talk]]; Scribunto text/plain local checkType = require('libraryUtil').checkType local p = {} local BODY_PARAM = '$B' local specialParams = { ['$params'] = 'parameter list', ['$aliases'] = 'parameter aliases', ['$flags'] = 'flags', ['$B'] = 'template content', ['$template-name'] = 'template invocation name override', } function p.main(frame, body) -- If we are substing, this function returns a template invocation, and if -- not, it returns the template body. The template body can be specified in -- the body parameter, or in the template parameter defined in the -- BODY_PARAM variable. This function can be called from Lua or from -- #invoke. -- Return the template body if we aren't substing. if not mw.isSubsting() then if body ~= nil then return body elseif frame.args[BODY_PARAM] ~= nil then return frame.args[BODY_PARAM] else error(string.format( "no template content specified (use parameter '%s' from #invoke)", BODY_PARAM ), 2) end end -- Sanity check for the frame object. if type(frame) ~= 'table' or type(frame.getParent) ~= 'function' or not frame:getParent() then error( "argument #1 to 'main' must be a frame object with a parent " .. "frame available", 2 ) end -- Find the invocation name. local mTemplateInvocation = require('Module:Template invocation') local name if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then name = frame.args['$template-name'] -- override whatever the template name is with this name else name = mTemplateInvocation.name(frame:getParent():getTitle()) end -- Combine passed args with passed defaults local args = {} if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then for k, v in pairs( frame:getParent().args ) do args[k] = v end for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end else for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end for k, v in pairs( frame:getParent().args ) do args[k] = v end end -- Trim parameters, if not specified otherwise if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end end -- Pull information from parameter aliases local aliases = {} if frame.args['$aliases'] then local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' ) for k, v in ipairs( list ) do local tmp = mw.text.split( v, '%s*>%s*' ) aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2]) end end for k, v in pairs( aliases ) do if args[k] and ( not args[v] or args[v] == '' ) then args[v] = args[k] end args[k] = nil end -- Remove empty parameters, if specified if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then local tmp = 0 for k, v in ipairs( args ) do if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then tmp = k else break end end for k, v in pairs( args ) do if v == '' then if not (type(k) == 'number' and k < tmp) then args[k] = nil end end end end -- Order parameters if frame.args['$params'] then local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {} for k, v in ipairs(params) do v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v if args[v] then tmp[v], args[v] = args[v], nil end end for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end args = tmp end return mTemplateInvocation.invocation(name, args) end p[''] = p.main -- For backwards compatibility return p 7f01ffc8aa2ac4a4772f14c12e0b77e384ecabb6 Template:Module other 10 944 1877 2021-10-20T19:50:22Z wikipedia>MusikBot II 0 Changed protection settings for "[[Template:Module other]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 3570 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Module}} | module | other }} }} | module = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 503694836c1b07142e63fd35d8be69ec8bb9ffe7 Template:View 10 971 1943 2021-10-22T01:56:06Z wikipedia>MusikBot II 0 Changed protection settings for "[[Template:View]]": [[Wikipedia:High-risk templates|High-risk template or module]]: 3357 transclusions ([[User:MusikBot II/TemplateProtector|more info]]) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite)) wikitext text/x-wiki {{#invoke:navbar|navbar|plain = 1|template = {{{template|{{{1|}}}}}}}}<noinclude> {{Documentation|Template:Navbar/doc}} </noinclude> 1ca014f2b7724c60659a51b385a22ce31f318f86 Template:Ambox 10 949 1895 2021-10-28T18:27:47Z wikipedia>GKFX 0 Copy fix from sandbox; only articles should go in this category. wikitext text/x-wiki {{#invoke:Message box|ambox}}{{#ifeq:{{{small}}};{{NAMESPACENUMBER}}|left;0|[[Category:Articles using small message boxes]]}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0c13ec156138ae0499c998cc3d7fbbeac4aeeed6 Template:Main 10 869 1715 2021-11-07T22:34:09Z wikipedia>Nihiltres 0 Includeonly the template to avoid errors on the template pages wikitext text/x-wiki <includeonly>{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 99ebf54e265aa9354bc4861d3b0da913f1441ede Template:Lua sidebar 10 919 1829 2021-11-15T22:24:39Z wikipedia>Izno 0 reduce expansion size slightly wikitext text/x-wiki {{Sidebar | class = lua-sidebar | templatestyles = Template:Lua sidebar/styles.css | title = Related pages | content1 = {{plainlist}} * [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}|Template]] {{#if:{{#invoke:redirect|isRedirect|Template talk:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}}}||([[Template talk:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}|talk]])}} * [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/sandbox|Template sandbox]] * [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/testcases|Template testcases]] * [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/doc|Template doc]] * [[Special:PrefixIndex/Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/|Template subpages]] * [[Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}|Module]] {{#if:{{#invoke:redirect|isRedirect|Module talk:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}}}||([[Module talk:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}|talk]])}} * [[Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/sandbox|Module sandbox]] * [[Module talk:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/testcases|Module testcases]] * [[Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/doc|Module doc]] * [[Special:PrefixIndex/Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/|Module subpages]] {{endplainlist}} | content2 = {{{1|}}} }}<noinclude> {{Documentation}} </noinclude> f11e49d67a400d29f6d73720fea7eb5a273ab663 Template:Main other 10 861 1697 2021-12-10T16:08:06Z Xaosflux 40 <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Module:Navbox/styles.css 828 885 1747 2021-12-21T22:10:10Z wikipedia>Izno 0 remove qualifications on th - this will remove styling from "hand-crafted" navboxes, but there's no other elegant way to deal with it. see talk page sanitized-css text/css /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Module:Hatnote list 828 878 1733 2021-12-26T20:05:24Z wikipedia>Nihiltres 0 Undid revision 1062166786 by [[Special:Contributions/Matthiaspaul|Matthiaspaul]] ([[User talk:Matthiaspaul|talk]]); should be fixed now, and if not, please ping me with examples as I couldn't reproduce the original error Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote list -- -- -- -- This module produces and formats lists for use in hatnotes. In particular, -- -- it implements the for-see list, i.e. lists of "For X, see Y" statements, -- -- as used in {{about}}, {{redirect}}, and their variants. Also introduced -- -- are andList & orList helpers for formatting lists with those conjunctions. -- -------------------------------------------------------------------------------- local mArguments --initialize lazily local mFormatLink = require('Module:Format link') local mHatnote = require('Module:Hatnote') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} -------------------------------------------------------------------------------- -- List stringification helper functions -- -- These functions are used for stringifying lists, usually page lists inside -- the "Y" portion of "For X, see Y" for-see items. -------------------------------------------------------------------------------- --default options table used across the list stringification functions local stringifyListDefaultOptions = { conjunction = "and", separator = ",", altSeparator = ";", space = " ", formatted = false } --Searches display text only local function searchDisp(haystack, needle) return string.find( string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle ) end -- Stringifies a list generically; probably shouldn't be used directly local function stringifyList(list, options) -- Type-checks, defaults, and a shortcut checkType("stringifyList", 1, list, "table") if #list == 0 then return nil end checkType("stringifyList", 2, options, "table", true) options = options or {} for k, v in pairs(stringifyListDefaultOptions) do if options[k] == nil then options[k] = v end end local s = options.space -- Format the list if requested if options.formatted then list = mFormatLink.formatPages( {categorizeMissing = mHatnote.missingTargetCat}, list ) end -- Set the separator; if any item contains it, use the alternate separator local separator = options.separator for k, v in pairs(list) do if searchDisp(v, separator) then separator = options.altSeparator break end end -- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§" local conjunction = s .. options.conjunction .. s if #list == 2 and searchDisp(list[1], "§") or #list > 2 then conjunction = separator .. conjunction end -- Return the formatted string return mw.text.listToText(list, separator .. s, conjunction) end --DRY function function p.conjList (conj, list, fmt) return stringifyList(list, {conjunction = conj, formatted = fmt}) end -- Stringifies lists with "and" or "or" function p.andList (...) return p.conjList("and", ...) end function p.orList (...) return p.conjList("or", ...) end -------------------------------------------------------------------------------- -- For see -- -- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the -- {{about}} and {{redirect}} templates and their variants. -------------------------------------------------------------------------------- --default options table used across the forSee family of functions local forSeeDefaultOptions = { andKeyword = 'and', title = mw.title.getCurrentTitle().text, otherText = 'other uses', forSeeForm = 'For %s, see %s.', } --Collapses duplicate punctuation local function punctuationCollapse (text) local replacements = { ["%.%.$"] = ".", ["%?%.$"] = "?", ["%!%.$"] = "!", ["%.%]%]%.$"] = ".]]", ["%?%]%]%.$"] = "?]]", ["%!%]%]%.$"] = "!]]" } for k, v in pairs(replacements) do text = string.gsub(text, k, v) end return text end -- Structures arguments into a table for stringification, & options function p.forSeeArgsToTable (args, from, options) -- Type-checks and defaults checkType("forSeeArgsToTable", 1, args, 'table') checkType("forSeeArgsToTable", 2, from, 'number', true) from = from or 1 checkType("forSeeArgsToTable", 3, options, 'table', true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- maxArg's gotten manually because getArgs() and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k) == 'number' and k > maxArg then maxArg = k end end -- Structure the data out from the parameter list: -- * forTable is the wrapper table, with forRow rows -- * Rows are tables of a "use" string & a "pages" table of pagename strings -- * Blanks are left empty for defaulting elsewhere, but can terminate list local forTable = {} local i = from local terminated = false -- If there is extra text, and no arguments are given, give nil value -- to not produce default of "For other uses, see foo (disambiguation)" if options.extratext and i > maxArg then return nil end -- Loop to generate rows repeat -- New empty row local forRow = {} -- On blank use, assume list's ended & break at end of this loop forRow.use = args[i] if not args[i] then terminated = true end -- New empty list of pages forRow.pages = {} -- Insert first pages item if present table.insert(forRow.pages, args[i + 1]) -- If the param after next is "and", do inner loop to collect params -- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} while args[i + 2] == options.andKeyword do if args[i + 3] then table.insert(forRow.pages, args[i + 3]) end -- Increment to next "and" i = i + 2 end -- Increment to next use i = i + 2 -- Append the row table.insert(forTable, forRow) until terminated or i > maxArg return forTable end -- Stringifies a table as formatted by forSeeArgsToTable function p.forSeeTableToString (forSeeTable, options) -- Type-checks and defaults checkType("forSeeTableToString", 1, forSeeTable, "table", true) checkType("forSeeTableToString", 2, options, "table", true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- Stringify each for-see item into a list local strList = {} if forSeeTable then for k, v in pairs(forSeeTable) do local useStr = v.use or options.otherText local pagesStr = p.andList(v.pages, true) or mFormatLink._formatLink{ categorizeMissing = mHatnote.missingTargetCat, link = mHatnote.disambiguate(options.title) } local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr) forSeeStr = punctuationCollapse(forSeeStr) table.insert(strList, forSeeStr) end end if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end -- Return the concatenated list return table.concat(strList, ' ') end -- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps -- but not blank/whitespace values. Ignores named args and args < "from". function p._forSee (args, from, options) local forSeeTable = p.forSeeArgsToTable(args, from, options) return p.forSeeTableToString(forSeeTable, options) end -- As _forSee, but uses the frame. function p.forSee (frame, from, options) mArguments = require('Module:Arguments') return p._forSee(mArguments.getArgs(frame), from, options) end return p d0828422b1aa0d0d0092d699d059c9e882260398 Template:FULLROOTPAGENAME 10 857 1689 2022-01-02T08:54:02Z Dinoguy1000 39 fix "|=foo" bug wikitext text/x-wiki {{ safesubst:<noinclude/>#if: {{ safesubst:<noinclude/>Ns has subpages | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{ safesubst:<noinclude/>NAMESPACE:{{{1}}}}}|{{ safesubst:<noinclude/>NAMESPACE}}}} }} | {{ safesubst:<noinclude/>#titleparts:{{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}}|1}} | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}} }}<noinclude> {{documentation}} </noinclude> fd0c4e7050dded2d50e5df405e6e5e31dd0d46ac Template:Citation style 10 963 1927 2022-01-02T09:37:16Z Dinoguy1000 39 fix "|=foo" bug wikitext text/x-wiki {{ safesubst:<noinclude/>#invoke:Unsubst||date=__DATE__ |$B= <!--{{Citation style}} begin-->{{Ambox | name = Citation style | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = style | small = {{{small|}}} | class = ambox-citation_style | sect = {{{1|}}} | issue = '''has an unclear citation style'''. {{#if:{{{reason|{{{details|}}}}}}|The reason given is: '''{{Terminate sentence|{{{reason|{{{details}}}}}}}}'''}} | fix = The references used may be made clearer with a different or consistent style of [[Wikipedia:Citing sources|citation]] and [[Help:Footnotes|footnoting]]. | cat = Wikipedia references cleanup | all = All articles needing references cleanup | cat2 = Articles covered by WikiProject Wikify | all2 = All articles covered by WikiProject Wikify | date = {{{date|}}} | removalnotice = yes }}<!--{{Citation style}} end--> }}<noinclude> {{Documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> ffdf9d833ab08e004e41c1c6da5fde056385ee2f Template:Underlinked 10 972 1945 2022-01-02T09:38:44Z Dinoguy1000 39 fix "|=foo" bug; rm unnecessary substitution check wikitext text/x-wiki {{ safesubst:<noinclude/>#invoke:Unsubst||date=__DATE__ |$B= <!--{{Underlinked}} begin-->{{Ambox | name = Underlinked | type = style | image = [[File:Ambox wikify.svg|50x40px|link=|alt=]] | issue = This {{{1|article}}} '''needs more [[Wikipedia:Manual of Style/Linking|links to other articles]] to help [[Wikipedia:Manual of Style/Linking#Principles|integrate it into the encyclopedia]]'''. | fix = Please help [{{fullurl:{{FULLPAGENAME}}|action=edit}} improve this article] by adding links [[Wikipedia:Manual of Style/Linking#Overlinking and underlinking|that are relevant to the context]] within the existing text. | removalnotice = yes | date = {{{date|}}} | cat = Articles with too few wikilinks | all = All articles with too few wikilinks | cat2 = Articles covered by WikiProject Wikify | all2 = All articles covered by WikiProject Wikify }}<!--{{Underlinked}} end--> }}<noinclude> {{Documentation}} </noinclude> 91b612fd89e6e3fdf0b30df492c6a9e2b83f3449 Module:Navbar/styles.css 828 882 1741 2022-01-03T23:12:15Z wikipedia>Izno 0 navbar styles that were moved to parent templates sanitized-css text/css /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Module:Infobox/styles.css 828 954 1905 2022-01-18T15:18:00Z wikipedia>Jdlrobson 0 Fix [[phab:T281642]], a pet peeve of mine. This copies across styles from [[MediaWiki:Minerva.css]] sanitized-css text/css /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Template:POV 10 958 1917 2022-01-20T20:37:15Z wikipedia>JJMC89 0 [[Wikipedia:Categories for discussion/Log/2021 December 23#Category:NPOV disputes]] wikitext text/x-wiki {{ safesubst:<noinclude/>#invoke:Unsubst||date=__DATE__ |$B= <!--{{POV}} begin-->{{Ambox | name = POV | subst = <includeonly>{{subst:substcheck}}</includeonly> | small = {{{small|}}} | type = content | class = ambox-POV | style = {{{style|}}} | image = [[File:Unbalanced scales.svg|50x40px|link=]] | issue = The '''[[Wikipedia:Neutral point of view|neutrality]] of this {{{what|article}}} is [[Wikipedia:NPOV dispute|disputed]]'''. | talk = {{{talk|#}}} | fix = Please do not remove this message until [[Template:POV#When to remove|conditions to do so are met]]. | removalnotice = yes | date = {{{date|}}} | cat = Wikipedia neutral point of view disputes | all = All Wikipedia neutral point of view disputes }}<!--{{POV}} end--> }}<noinclude> {{Documentation}} </noinclude> e8c041c852b18976809007fd683af9617ab6dacb Module:Documentation/config 828 839 1781 2022-01-25T23:46:11Z wikipedia>Ianblair23 0 link Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] -- A category to add to all template sandboxes. cfg['sandbox-category'] = 'Template sandboxes' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 71b68ed73088f1a59d61acf06bbee9fde6677f03 Module:TableTools 828 865 1705 2022-01-31T13:08:18Z wikipedia>MSGJ 0 updates/fixes requested by [[User:Uzume]] Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = _deepCopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p 085e7094ac84eb0132ee65822cf3f69cd8ba3d81 Module:Check for unknown parameters 828 862 1699 2022-02-21T05:24:13Z wikipedia>BusterD 0 Changed protection settings for "[[Module:Check for unknown parameters]]": [[WP:High-risk templates|Highly visible template]]; requested at [[WP:RfPP]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p 93db6d115d4328d2a5148bb42959105e367b663e Module:Effective protection expiry 828 872 1721 2022-02-23T10:59:29Z Xaosflux 40 Changed protection settings for "[[Module:Effective protection expiry]]": used in the mediawiki interface / match [[Module:Effective protection level]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Template:Ns has subpages 10 858 1691 2022-03-02T10:43:18Z wikipedia>Trialpears 0 Changed protection settings for "[[Template:Ns has subpages]]": [[WP:High-risk templates|Highly visible template]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Ns has subpages|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 060d2d01af26cb67fd90a7c346a0d2d5e450a040 Module:Template link general 828 867 1709 2022-03-08T08:30:51Z wikipedia>Primefac 0 update from sandbox - fixes to _show_result and adding _expand Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Template:Clear 10 844 1649 2022-03-08T14:12:32Z DarkMatterMan4500 7 Created page with "<div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude>" wikitext text/x-wiki <div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude> 38bab3e3d7fbd3d6800d46556e60bc6bac494d72 1713 1649 2022-06-13T15:31:11Z Xaosflux 40 Changed protection settings for "[[Template:Clear]]": [[WP:High-risk templates|Highly visible template]]: 3MM+ uses ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite)) wikitext text/x-wiki <div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude> 38bab3e3d7fbd3d6800d46556e60bc6bac494d72 Template:Documentation 10 18 1777 2022-03-29T02:14:34Z wikipedia>Bsherr 0 consistent with new substitution template format wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> 9e62b964e96c4e3d478edecbfcb3c0338ae8a276 Template:Multiple issues/styles.css 10 951 1899 2022-05-07T20:39:15Z wikipedia>Izno 0 add these other inline styles sanitized-css text/css /* {{pp|small=y}} */ .multiple-issues-text { width: 95%; margin: 0.2em 0; } .multiple-issues-text > .mw-collapsible-content { margin-top: 0.3em; } /* Remove borders, backgrounds, padding, etc. */ .compact-ambox .ambox { border: none; border-collapse: collapse; background-color: transparent; margin: 0 0 0 1.6em !important; padding: 0 !important; width: auto; display: block; } body.mediawiki .compact-ambox .ambox.mbox-small-left { font-size: 100%; width: auto; margin: 0; } /* Style the text cell as a list item and remove its padding */ .compact-ambox .ambox .mbox-text { padding: 0 !important; margin: 0 !important; } .compact-ambox .ambox .mbox-text-span { display: list-item; line-height: 1.5em; list-style-type: disc; } /* Hide the images */ .compact-ambox .ambox .mbox-image, .compact-ambox .ambox .mbox-imageright, .compact-ambox .ambox .mbox-empty-cell, /* Allow for hiding text in compact form */ .compact-ambox .hide-when-compact { display: none; } e90883916010fd38cd4f9c7e10c4a01908c965cb Template:Multiple issues 10 950 1897 2022-05-07T20:41:52Z wikipedia>Izno 0 add templatestyles wikitext text/x-wiki {{ {{{|safesubst:}}}#invoke:Unsubst||$B= {{Ambox |name = Multiple issues |templatestyles = Multiple issues/styles.css |doc = no |subst = <includeonly>{{subst:substcheck}}</includeonly> |class = ambox-multiple_issues compact-ambox |type = content |removalnotice = yes <!-- as of 2016-06, param does not work on this template --> |cat=Articles with multiple maintenance issues |text = <div class="multiple-issues-text {{#if:{{{1|}}}|mw-collapsible {{#ifeq:{{{collapsed}}}|yes|mw-collapsed}}}}"><!-- -->'''This {{#if:{{{section|}}}|section|article}} has multiple issues.''' Please help '''[{{fullurl:{{FULLPAGENAME}}|action=edit}} improve it]''' or discuss these issues on the '''[[{{TALKPAGENAME}}|talk page]]'''. <small>''([[Help:Maintenance template removal|Learn how and when to remove these template messages]])''</small> {{#if:{{{1|}}} | <div class="mw-collapsible-content"> {{#invoke:String|replace|source={{{1|}}}|pattern=style="display: none"|replace=|count=}}<!--remove style="display: none", to support display of {{orphan}} messages in {{multiple issues}}--> </div> | <includeonly>{{error|No issues specified. Please specify issues, or remove this template.}}</includeonly> }} </div> {{#if:{{{2|}}}|[[Category:Pages using multiple issues with unknown parameters|§{{PAGENAME}}]]}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using multiple issues with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Multiple issues]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | collapsed | section }} }}<noinclude> {{Documentation}} </noinclude> 901c03957b27f754d3caf69d5c74740f793c9a03 Template:Module rating 10 946 1881 2022-06-03T15:10:23Z wikipedia>The Anome 0 Reverted edits by [[Special:Contribs/Dawn PScLim|Dawn PScLim]] ([[User talk:Dawn PScLim|talk]]) to last version by Alexis Jazz wikitext text/x-wiki <includeonly>{{#ifeq:{{SUBPAGENAME}}|doc|<!--do not show protection level of the module on the doc page, use the second and optionally third parameter if the doc page is also protected -->{{#if:{{{2|}}}|{{Pp|{{{2}}}|action={{{3|}}}}}}}|{{Module other|{{ombox | type = notice | image = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = [[File:Ambox warning blue construction.svg|40x40px|link=|alt=Pre-alpha]] | alpha | a = [[File:Alpha lowercase.svg|26x26px|link=|alt=Alpha]] | beta | b = [[File:Greek lc beta.svg|40x40px|link=|alt=Beta]] | release | r | general | g = [[File:Green check.svg|40x40px|link=|alt=Ready for use]] | protected | protect | p = [[File:{{#switch:{{#invoke:Effective protection level|edit|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{FULLBASEPAGENAME}}|{{FULLPAGENAME}}}}}}|autoconfirmed=Semi|extendedconfirmed=Extended|accountcreator|templateeditor=Template|#default=Full}}-protection-shackle.svg|40x40px|link=|alt=Protected]] | semiprotected | semiprotect | semi =[[File:Semi-protection-shackle.svg|40x40px|link=|alt=Semi-protected]] }} | style = | textstyle = | text = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = This module is rated as [[:Category:Modules in pre-alpha development|pre-alpha]]. It is unfinished, and may or may not be in active development. It should not be used from article namespace pages. Modules remain pre-alpha until the original editor (or someone who takes one over if it is abandoned for some time) is satisfied with the basic structure.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in pre-alpha development|{{PAGENAME}}]] }} }} | alpha | a = This module is rated as [[:Category:Modules in alpha|alpha]]. It is ready for third-party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in alpha|{{PAGENAME}}]] }} }} | beta | b = This module is rated as [[:Category:Modules in beta|beta]], and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in beta|{{PAGENAME}}]] }} }} | release | r | general | g = This module is rated as [[:Category:Modules for general use|ready for general use]]. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by [[Wikipedia:Template sandbox and test cases|sandbox testing]] rather than repeated trial-and-error editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules for general use|{{PAGENAME}}]] }} }} | protected | protect | p = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[Wikipedia:Protection policy|protected]] from editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules subject to page protection|{{PAGENAME}}]] }} }} | semiprotected | semiprotect | semi = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[WP:SEMI|semi-protected]] from editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules subject to page protection|{{PAGENAME}}]] }} }} | #default = {{error|Module rating is invalid or not specified.}} }} }}|{{error|Error: {{tl|Module rating}} must be placed in the Module namespace.}} [[Category:Pages with templates in the wrong namespace]]|demospace={{{demospace|<noinclude>module</noinclude>}}}}}}}</includeonly><noinclude> {{module rating|release|nocat=true|demospace=module}} {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go in Wikidata. --> </noinclude> bbd244b3ea2e13ec4c1c810ae44f2f3789a93efc Module:Labelled list hatnote 828 879 1735 2022-06-08T23:33:35Z wikipedia>Nihiltres 0 Fixed iteration-and-removal bug Scribunto text/plain -------------------------------------------------------------------------------- -- Labelled list -- -- -- -- This module does the core work of creating a hatnote composed of a list -- -- prefixed by a colon-terminated label, i.e. "LABEL: [andList of pages]", -- -- for {{see also}} and similar templates. -- -------------------------------------------------------------------------------- local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments --initialize lazily local yesno --initialize lazily local p = {} -- Defaults global to this module local defaults = { label = 'See also', --Final fallback for label argument labelForm = '%s: %s', prefixes = {'label', 'label ', 'l'}, template = 'Module:Labelled list hatnote' } -- Localizable message strings local msg = { errorSuffix = '#Errors', noInputWarning = 'no page names specified', noOutputWarning = "'''[[%s]] — no output: none of the target pages exist.'''" } -- Helper function that pre-combines display parameters into page arguments. -- Also compresses sparse arrays, as a desirable side-effect. function p.preprocessDisplays (args, prefixes) -- Prefixes specify which parameters, in order, to check for display options -- They each have numbers auto-appended, e.g. 'label1', 'label 1', & 'l1' prefixes = prefixes or defaults.prefixes local indices = {} local sparsePages = {} for k, v in pairs(args) do if type(k) == 'number' then indices[#indices + 1] = k local display for i = 1, #prefixes do display = args[prefixes[i] .. k] if display then break end end sparsePages[k] = display and string.format('%s|%s', string.gsub(v, '|.*$', ''), display) or v end end table.sort(indices) local pages = {} for k, v in ipairs(indices) do pages[#pages + 1] = sparsePages[v] end return pages end --Helper function to get a page target from a processed page string --e.g. "Page|Label" → "Page" or "Target" → "Target" local function getTarget(pagename) local pipe = string.find(pagename, '|') return string.sub(pagename, 0, pipe and pipe - 1 or nil) end -- Produces a labelled pages-list hatnote. -- The main frame (template definition) takes 1 or 2 arguments, for a singular -- and (optionally) plural label respectively: -- * {{#invoke:Labelled list hatnote|labelledList|Singular label|Plural label}} -- The resulting template takes pagename & label parameters normally. function p.labelledList (frame) mArguments = require('Module:Arguments') yesno = require('Module:Yesno') local labels = {frame.args[1] or defaults.label} labels[2] = frame.args[2] or labels[1] labels[3] = frame.args[3] --no defaulting labels[4] = frame.args[4] --no defaulting local template = frame:getParent():getTitle() local args = mArguments.getArgs(frame, {parentOnly = true}) local pages = p.preprocessDisplays(args) local options = { category = yesno(args.category), extraclasses = frame.args.extraclasses, ifexists = yesno(frame.args.ifexists), namespace = frame.args.namespace or args.namespace, selfref = yesno(frame.args.selfref or args.selfref), template = template } return p._labelledList(pages, labels, options) end function p._labelledList (pages, labels, options) if options.ifexists then for k = #pages, 1, -1 do --iterate backwards to allow smooth removals local v = pages[k] local title = mw.title.new(getTarget(v), namespace) if (v == '') or title == nil or not title.exists then table.remove(pages, k) end end end labels = labels or {} label = (#pages == 1 and labels[1] or labels[2]) or defaults.label for k, v in pairs(pages) do if mHatnote.findNamespaceId(v) ~= 0 then label = ( #pages == 1 and (labels[3] or labels[1] or defaults.label) or (labels[4] or labels[2] or defaults.label) ) or defaults.label end end if #pages == 0 then if options.ifexists then mw.addWarning( string.format( msg.noOutputWarning, options.template or defaults.template ) ) return '' else return mHatnote.makeWikitextError( msg.noInputWarning, (options.template or defaults.template) .. msg.errorSuffix, options.category ) end end local text = string.format( options.labelForm or defaults.labelForm, label, mHatlist.andList(pages, true) ) local hnOptions = { extraclasses = options.extraclasses, selfref = options.selfref } return mHatnote._hatnote(text, hnOptions) end return p b7a8ba27cf6195e6427701b94e8d2acad3c40a21 Module:Message box/configuration 828 846 1681 2022-07-11T18:19:26Z wikipedia>Izno 0 add templatestyles, remove a variable or two as a result Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this template message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css' }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } b6f0151037e6867b577c8cca32ff297e48697a10 Module:Message box/ombox.css 828 925 1841 2022-07-11T18:40:17Z wikipedia>Izno 0 and move mbox-small to 720px here as well sanitized-css text/css /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Module:Message box/ambox.css 828 977 1955 2022-07-12T15:25:07Z wikipedia>Izno 0 hack around mf being opinionated sanitized-css text/css /* {{pp|small=y}} */ .ambox { border: 1px solid #a2a9b1; /* @noflip */ border-left: 10px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } /* Single border between stacked boxes. Take into account base templatestyles, * user styles, and Template:Dated maintenance category. * remove link selector when T200206 is fixed */ .ambox + link + .ambox, .ambox + link + style + .ambox, .ambox + link + link + .ambox, /* TODO: raise these as "is this really that necessary???". the change was Dec 2021 */ .ambox + .mw-empty-elt + link + .ambox, .ambox + .mw-empty-elt + link + style + .ambox, .ambox + .mw-empty-elt + link + link + .ambox { margin-top: -1px; } /* For the "small=left" option. */ /* must override .ambox + .ambox styles above */ html body.mediawiki .ambox.mbox-small-left { /* @noflip */ margin: 4px 1em 4px 0; overflow: hidden; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; } .ambox-speedy { /* @noflip */ border-left: 10px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ambox-delete { /* @noflip */ border-left: 10px solid #b32424; /* Red */ } .ambox-content { /* @noflip */ border-left: 10px solid #f28500; /* Orange */ } .ambox-style { /* @noflip */ border-left: 10px solid #fc3; /* Yellow */ } .ambox-move { /* @noflip */ border-left: 10px solid #9932cc; /* Purple */ } .ambox-protection { /* @noflip */ border-left: 10px solid #a2a9b1; /* Gray-gold */ } .ambox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.5em; width: 100%; } .ambox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.5em; text-align: center; } .ambox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.5em 2px 0; text-align: center; } /* An empty narrow cell */ .ambox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ambox .mbox-image-div { width: 52px; } /* Hack around MobileFrontend being opinionated */ html.client-js body.skin-minerva .mbox-text-span { margin-left: 23px !important; } @media (min-width: 720px) { .ambox { margin: 0 10%; /* 10% = Will not overlap with other elements */ } } 29898fdc5160b39a8f580c76efe77afa1f6f58a4 Template:Para 10 850 1771 2022-07-22T08:06:17Z wikipedia>TheDJ 0 breakup super long words, so we do not overflow the viewport. wikitext text/x-wiki <code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{plain|}}}{{{mxt|}}}{{{green|}}}{{{!mxt|}}}{{{red|}}}|color: {{SAFESUBST:<noinclude />#if:{{{mxt|}}}{{{green|}}}|#006400|{{SAFESUBST:<noinclude />#if:{{{!mxt|}}}{{{red|}}}|#8B0000|inherit}}}};}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 06006deea2ed5d552aab61b4332321ab749ae7e8 Template:Used in system 10 947 1883 2022-08-20T15:58:28Z Pppery 34 Not an improvement - there's already a well-established edit request process starting with clicking "view source" and we don't need a duplicative process for the specific set of templates that are used in system messages wikitext text/x-wiki {{#invoke:High-use|main|1=|2={{{2|}}}|system={{#if:{{{1|}}}|{{{1}}}|in system messages}}<noinclude>|nocat=true</noinclude>}}<noinclude> {{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 0abe278369db6cbbe319e7452d7644e27e11c532 Main Page 0 1 1 2022-08-30T18:40:41Z MediaWiki default 1 Create main page wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. === For the bureaucrat(s) of this wiki === Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting. You can immediately start working on your wiki or whenever you want. Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links: * [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users) * [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]] * [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.) ==== I still don't understand X! ==== Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here: * [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]] * On [[phab:|Phabricator]] * On [https://miraheze.org/discord Discord] * On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat]) === For visitors of this wiki === Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later! 21236ac3f8d65e5563b6da6b70815ca6bf1e6616 首页 0 2 2 2022-08-31T09:03:12Z Richard Robin 2 创建页面,内容为“<center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''Special:Statistics|{{NUMBEROFARTI…” wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 === 更多内容您可以访问: === [https://www.theoctonauts.com 海底小纵队官方网站(英文)] [https://weibo.com/u/5184055512 海底小纵队官方微博] [https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] [https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] [https://www.facebook.com/octonauts 海底小纵队官方脸书] [https://twitter.com/Octonauts 海底小纵队官方推特] [https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] 7fa09787c3e0fa52b89ca4a1674355d3bc2a10b0 3 2 2022-08-31T09:03:59Z Richard Robin 2 已保护“[[首页]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 === 更多内容您可以访问: === [https://www.theoctonauts.com 海底小纵队官方网站(英文)] [https://weibo.com/u/5184055512 海底小纵队官方微博] [https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] [https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] [https://www.facebook.com/octonauts 海底小纵队官方脸书] [https://twitter.com/Octonauts 海底小纵队官方推特] [https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] 7fa09787c3e0fa52b89ca4a1674355d3bc2a10b0 File:海底小纵队维基LOGO.png 6 3 4 2022-08-31T12:06:43Z Richard Robin 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:巴克队长、呱唧、帕尼.png 6 4 5 2022-08-31T13:40:25Z Richard Robin 2 巴克队长、呱唧、帕尼 wikitext text/x-wiki == 摘要 == 巴克队长、呱唧、帕尼 65efec92128960e68e15908bc549e8e21064c7ae 首页 0 2 6 3 2022-08-31T13:42:13Z Richard Robin 2 增加图片用于装饰 wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 === 更多内容您可以访问: === [https://www.theoctonauts.com 海底小纵队官方网站(英文)] [https://weibo.com/u/5184055512 海底小纵队官方微博] [https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] [https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] [https://www.facebook.com/octonauts 海底小纵队官方脸书] [https://twitter.com/Octonauts 海底小纵队官方推特] [https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] beaa286b0e828c7e7908126fe4575f791a1ab72d 54 6 2022-09-24T03:57:11Z Richard Robin 2 /* 更多内容您可以访问: */ wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 === 更多内容您可以访问: === [https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] [https://www.theoctonauts.com 海底小纵队英文官方网站] [https://weibo.com/u/5184055512 海底小纵队官方微博] [https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] [https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] [https://www.facebook.com/octonauts 海底小纵队官方脸书] [https://twitter.com/Octonauts 海底小纵队官方推特] [https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] 688ebf791b7fd912a61d7f65e4ad1cacf0d35b56 MediaWiki:Common.css 8 5 7 2022-08-31T14:16:20Z Richard Robin 2 创建页面,内容为“/* 这里放置的CSS将应用于所有皮肤 */ /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; } table.navbox+table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; } .navbox-…” css text/css /* 这里放置的CSS将应用于所有皮肤 */ /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; } table.navbox+table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; } .navbox-group { font-weight: 700; padding-left: 1em; padding-right: 1em; white-space: nowrap; } .navbox, .navbox-subgroup { background: none repeat scroll 0 0 #fdfdfd; } .navbox-list { border-color: #fdfdfd; } .navbox-title, table.navbox th { background: none repeat scroll 0 0 #769FCD; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background: none repeat scroll 0 0 #B9D7EA; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background: none repeat scroll 0 0 #b9d7ea; } .navbox-even { background: none repeat scroll 0 0 #eefaff; } .navbox-odd { background: none repeat scroll 0 0 transparent; } .collapseButton { float: right; font-weight: 400; text-align: right; width: auto; } .navbox .collapseButton { width: 6em; } 283fd0e0bb476a00ca26affe5381eb22e0b8a3e0 8 7 2022-08-31T15:45:21Z Richard Robin 2 css text/css /* 这里放置的CSS将应用于所有皮肤 */ /* 主页 */ #mainpage { display: block; width: 100%; border-collapse: collapse; text-align: left; margin: 0 auto; /* 居中 */ max-width: 1030px; } .mainpage-newsbox { width: 66.67%; float: left; } .mainpage-box { float: left; width: 33.33%; } .mainpage-title { font-size: 1.618em; color: #228b22; margin: 0; background: #deede0; font-weight: 400; /* 400 = normal */ height: 30px; line-height: 30px; text-align: center; font-size-adjust: .43; } .mainpage-content, .mainpage-1stcontent { vertical-align: top; padding: .5em 2%; min-height: 230px; } .mainpage-content.nomobile { min-height: auto; } .clear-div { clear: both; } /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; } table.navbox+table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; } .navbox-group { font-weight: 700; padding-left: 1em; padding-right: 1em; white-space: nowrap; } .navbox, .navbox-subgroup { background: none repeat scroll 0 0 #fdfdfd; } .navbox-list { border-color: #fdfdfd; } .navbox-title, table.navbox th { background: none repeat scroll 0 0 #769FCD; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background: none repeat scroll 0 0 #B9D7EA; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background: none repeat scroll 0 0 #b9d7ea; } .navbox-even { background: none repeat scroll 0 0 #eefaff; } .navbox-odd { background: none repeat scroll 0 0 transparent; } .collapseButton { float: right; font-weight: 400; text-align: right; width: auto; } .navbox .collapseButton { width: 6em; } 5d33cbf271a4a37c74ec6c6b7ba13a836698604f 9 8 2022-08-31T16:24:17Z Richard Robin 2 css text/css /* 这里放置的CSS将应用于所有皮肤 */ /* 主页 */ body.page-Main_Page h1.firstHeading { display:none; } #mainpage { display: block; width: 100%; border-collapse: collapse; text-align: left; margin: 0 auto; /* 居中 */ max-width: 1030px; } .mainpage-newsbox { width: 66.67%; float: left; } .mainpage-box { float: left; width: 33.33%; } .mainpage-title { font-size: 1.618em; color: #228b22; margin: 0; background: #deede0; font-weight: 400; /* 400 = normal */ height: 30px; line-height: 30px; text-align: center; font-size-adjust: .43; } .mainpage-content, .mainpage-1stcontent { vertical-align: top; padding: .5em 2%; min-height: 230px; } .mainpage-content.nomobile { min-height: auto; } .clear-div { clear: both; } /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; } table.navbox+table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; } .navbox-group { font-weight: 700; padding-left: 1em; padding-right: 1em; white-space: nowrap; } .navbox, .navbox-subgroup { background: none repeat scroll 0 0 #fdfdfd; } .navbox-list { border-color: #fdfdfd; } .navbox-title, table.navbox th { background: none repeat scroll 0 0 #769FCD; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background: none repeat scroll 0 0 #B9D7EA; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background: none repeat scroll 0 0 #b9d7ea; } .navbox-even { background: none repeat scroll 0 0 #eefaff; } .navbox-odd { background: none repeat scroll 0 0 transparent; } .collapseButton { float: right; font-weight: 400; text-align: right; width: auto; } .navbox .collapseButton { width: 6em; } 5d6c364cd8fb03dd40424095a267d4bb654fc649 10 9 2022-08-31T16:27:51Z Richard Robin 2 css text/css /* 这里放置的CSS将应用于所有皮肤 */ /*隐藏首页标题*/ .page-首页 #firstHeading{display:none;} /* 主页 */ #mainpage { display: block; width: 100%; border-collapse: collapse; text-align: left; margin: 0 auto; /* 居中 */ max-width: 1030px; } .mainpage-newsbox { width: 66.67%; float: left; } .mainpage-box { float: left; width: 33.33%; } .mainpage-title { font-size: 1.618em; color: #228b22; margin: 0; background: #deede0; font-weight: 400; /* 400 = normal */ height: 30px; line-height: 30px; text-align: center; font-size-adjust: .43; } .mainpage-content, .mainpage-1stcontent { vertical-align: top; padding: .5em 2%; min-height: 230px; } .mainpage-content.nomobile { min-height: auto; } .clear-div { clear: both; } /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; } table.navbox+table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; } .navbox-group { font-weight: 700; padding-left: 1em; padding-right: 1em; white-space: nowrap; } .navbox, .navbox-subgroup { background: none repeat scroll 0 0 #fdfdfd; } .navbox-list { border-color: #fdfdfd; } .navbox-title, table.navbox th { background: none repeat scroll 0 0 #769FCD; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background: none repeat scroll 0 0 #B9D7EA; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background: none repeat scroll 0 0 #b9d7ea; } .navbox-even { background: none repeat scroll 0 0 #eefaff; } .navbox-odd { background: none repeat scroll 0 0 transparent; } .collapseButton { float: right; font-weight: 400; text-align: right; width: auto; } .navbox .collapseButton { width: 6em; } 19bb450442bf781ab7a4240d02fefdcc84ea2ca6 11 10 2022-08-31T16:28:26Z Richard Robin 2 已保护“[[MediaWiki:Common.css]]”:​保护核心页面([编辑=仅允许自动确认用户](无限期)[移动=仅允许管理员](无限期)) css text/css /* 这里放置的CSS将应用于所有皮肤 */ /*隐藏首页标题*/ .page-首页 #firstHeading{display:none;} /* 主页 */ #mainpage { display: block; width: 100%; border-collapse: collapse; text-align: left; margin: 0 auto; /* 居中 */ max-width: 1030px; } .mainpage-newsbox { width: 66.67%; float: left; } .mainpage-box { float: left; width: 33.33%; } .mainpage-title { font-size: 1.618em; color: #228b22; margin: 0; background: #deede0; font-weight: 400; /* 400 = normal */ height: 30px; line-height: 30px; text-align: center; font-size-adjust: .43; } .mainpage-content, .mainpage-1stcontent { vertical-align: top; padding: .5em 2%; min-height: 230px; } .mainpage-content.nomobile { min-height: auto; } .clear-div { clear: both; } /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; } table.navbox+table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; } .navbox-group { font-weight: 700; padding-left: 1em; padding-right: 1em; white-space: nowrap; } .navbox, .navbox-subgroup { background: none repeat scroll 0 0 #fdfdfd; } .navbox-list { border-color: #fdfdfd; } .navbox-title, table.navbox th { background: none repeat scroll 0 0 #769FCD; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background: none repeat scroll 0 0 #B9D7EA; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background: none repeat scroll 0 0 #b9d7ea; } .navbox-even { background: none repeat scroll 0 0 #eefaff; } .navbox-odd { background: none repeat scroll 0 0 transparent; } .collapseButton { float: right; font-weight: 400; text-align: right; width: auto; } .navbox .collapseButton { width: 6em; } 19bb450442bf781ab7a4240d02fefdcc84ea2ca6 12 11 2022-08-31T16:28:31Z Richard Robin 2 已更改“[[MediaWiki:Common.css]]”的保护设置:​保护核心页面([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) css text/css /* 这里放置的CSS将应用于所有皮肤 */ /*隐藏首页标题*/ .page-首页 #firstHeading{display:none;} /* 主页 */ #mainpage { display: block; width: 100%; border-collapse: collapse; text-align: left; margin: 0 auto; /* 居中 */ max-width: 1030px; } .mainpage-newsbox { width: 66.67%; float: left; } .mainpage-box { float: left; width: 33.33%; } .mainpage-title { font-size: 1.618em; color: #228b22; margin: 0; background: #deede0; font-weight: 400; /* 400 = normal */ height: 30px; line-height: 30px; text-align: center; font-size-adjust: .43; } .mainpage-content, .mainpage-1stcontent { vertical-align: top; padding: .5em 2%; min-height: 230px; } .mainpage-content.nomobile { min-height: auto; } .clear-div { clear: both; } /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; } table.navbox+table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; } .navbox-group { font-weight: 700; padding-left: 1em; padding-right: 1em; white-space: nowrap; } .navbox, .navbox-subgroup { background: none repeat scroll 0 0 #fdfdfd; } .navbox-list { border-color: #fdfdfd; } .navbox-title, table.navbox th { background: none repeat scroll 0 0 #769FCD; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background: none repeat scroll 0 0 #B9D7EA; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background: none repeat scroll 0 0 #b9d7ea; } .navbox-even { background: none repeat scroll 0 0 #eefaff; } .navbox-odd { background: none repeat scroll 0 0 transparent; } .collapseButton { float: right; font-weight: 400; text-align: right; width: auto; } .navbox .collapseButton { width: 6em; } 19bb450442bf781ab7a4240d02fefdcc84ea2ca6 13 12 2022-08-31T16:33:25Z Richard Robin 2 css text/css /* 这里放置的CSS将应用于所有皮肤 */ /*隐藏首页标题*/ .page-首页 #deleteconfirm, .page-首页 #t-cite, .page-首页 #footer-info-lastmod, .action-view.page-首页 #siteSub, .action-view.page-首页 .subtitle, .action-view.page-首页 .firstHeading, .action-view.page-首页 #contentSub, .action-view.page-首页 #contentSub2 { display: none; } /* 主页 */ #mainpage { display: block; width: 100%; border-collapse: collapse; text-align: left; margin: 0 auto; /* 居中 */ max-width: 1030px; } .mainpage-newsbox { width: 66.67%; float: left; } .mainpage-box { float: left; width: 33.33%; } .mainpage-title { font-size: 1.618em; color: #228b22; margin: 0; background: #deede0; font-weight: 400; /* 400 = normal */ height: 30px; line-height: 30px; text-align: center; font-size-adjust: .43; } .mainpage-content, .mainpage-1stcontent { vertical-align: top; padding: .5em 2%; min-height: 230px; } .mainpage-content.nomobile { min-height: auto; } .clear-div { clear: both; } /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; } table.navbox+table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; } .navbox-group { font-weight: 700; padding-left: 1em; padding-right: 1em; white-space: nowrap; } .navbox, .navbox-subgroup { background: none repeat scroll 0 0 #fdfdfd; } .navbox-list { border-color: #fdfdfd; } .navbox-title, table.navbox th { background: none repeat scroll 0 0 #769FCD; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background: none repeat scroll 0 0 #B9D7EA; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background: none repeat scroll 0 0 #b9d7ea; } .navbox-even { background: none repeat scroll 0 0 #eefaff; } .navbox-odd { background: none repeat scroll 0 0 transparent; } .collapseButton { float: right; font-weight: 400; text-align: right; width: auto; } .navbox .collapseButton { width: 6em; } c5882834794dc965ead83a419daf88e939e26210 14 13 2022-08-31T16:35:04Z Richard Robin 2 css text/css /* 这里放置的CSS将应用于所有皮肤 */ /*隐藏首页标题*/ .page-首页 #deleteconfirm, .page-首页 #t-cite, .page-首页 #footer-info-lastmod, .action-view.page-首页 #siteSub, .action-view.page-首页 .subtitle, .action-view.page-首页 .firstHeading, .action-view.page-首页 #contentSub, .action-view.page-首页 #contentSub2 { display: none; } /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; } table.navbox+table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; } .navbox-group { font-weight: 700; padding-left: 1em; padding-right: 1em; white-space: nowrap; } .navbox, .navbox-subgroup { background: none repeat scroll 0 0 #fdfdfd; } .navbox-list { border-color: #fdfdfd; } .navbox-title, table.navbox th { background: none repeat scroll 0 0 #769FCD; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background: none repeat scroll 0 0 #B9D7EA; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background: none repeat scroll 0 0 #b9d7ea; } .navbox-even { background: none repeat scroll 0 0 #eefaff; } .navbox-odd { background: none repeat scroll 0 0 transparent; } .collapseButton { float: right; font-weight: 400; text-align: right; width: auto; } .navbox .collapseButton { width: 6em; } 49fe74edf8f419d42b9e079634dd2ada65beb374 15 14 2022-08-31T16:49:00Z Richard Robin 2 css text/css /* 这里放置的CSS将应用于所有皮肤 */ /*隐藏首页标题*/ .page-首页 #deleteconfirm, .page-首页 #t-cite, .page-首页 #footer-info-lastmod, .action-view.page-首页 #siteSub, .action-view.page-首页 .subtitle, .action-view.page-首页 .firstHeading, .action-view.page-首页 #contentSub, .action-view.page-首页 #contentSub2 { display: none; } /* 导航框的默认样式 */ .navbox { /* Navbox container style */ box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; margin: auto; clear: both; font-size: 88%; text-align: center; padding: 1px; } .navbox + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-title, .navbox-abovebelow, .navbox th { text-align: center; /* Title, group and above/below styles */ padding-left: 1em; padding-right: 1em; } th.navbox-group { /* Group style */ white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; /* Background color */ } .navbox-list { border-color: #fdfdfd; /* Must match background color */ } /* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; } table.navbox+table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; } .navbox-group { font-weight: 700; padding-left: 1em; padding-right: 1em; white-space: nowrap; } .navbox, .navbox-subgroup { background: none repeat scroll 0 0 #fdfdfd; } .navbox-list { border-color: #fdfdfd; } .navbox-title, table.navbox th { background: none repeat scroll 0 0 #769FCD; } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background: none repeat scroll 0 0 #B9D7EA; } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background: none repeat scroll 0 0 #b9d7ea; } .navbox-even { background: none repeat scroll 0 0 #eefaff; } .navbox-odd { background: none repeat scroll 0 0 transparent; } .collapseButton { float: right; font-weight: 400; text-align: right; width: auto; } .navbox .collapseButton { width: 6em; } 4512909654fce9176eea291fc4aacf605e127866 Module:Hatnote 828 876 1729 2022-09-05T18:18:32Z wikipedia>Nihiltres 0 Reordered helper functions (first by export status, then alphabetically) and migrated p.quote upstream from [[Module:Redirect hatnote]] (includes contributions by Tamzin and Nihiltres) Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules. -- -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local yesno -- lazily initialise [[Module:Yesno]] local formatLink -- lazily initialise [[Module:Format link]] ._formatLink local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline) -- Provides the default hatnote classes as a space-separated string; useful -- for hatnote-manipulation modules like [[Module:Hatnote group]]. return (inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' .. 'navigation-not-searchable' end function p.disambiguate(page, disambiguator) -- Formats a page title with a disambiguation parenthetical, -- i.e. "Example" → "Example (disambiguation)". checkType('disambiguate', 1, page, 'string') checkType('disambiguate', 2, disambiguator, 'string', true) disambiguator = disambiguator or 'disambiguation' return mw.ustring.format('%s (%s)', page, disambiguator) end function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to false. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end function p.makeWikitextError(msg, helpLink, addTrackingCategory, title) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- [[Module:Yesno]], and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') title = title or mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' ([[' .. helpLink .. '|help]])' else helpText = '' end -- Make the category text. local category if not title.isTalkPage -- Don't categorise talk pages and title.namespace ~= 2 -- Don't categorise userspace and yesno(addTrackingCategory) ~= false -- Allow opting out then category = 'Hatnote templates with errors' category = mw.ustring.format( '[[%s:%s]]', mw.site.namespaces[14].name, category ) else category = '' end return mw.ustring.format( '<strong class="error">Error: %s%s.</strong>%s', msg, helpText, category ) end local curNs = mw.title.getCurrentTitle().namespace p.missingTargetCat = --Default missing target category, exported for use in related modules ((curNs == 0) or (curNs == 14)) and 'Articles with hatnote templates targeting a nonexistent page' or nil function p.quote(title) --Wraps titles in quotation marks. If the title starts/ends with a quotation --mark, kerns that side as with {{-'}} local quotationMarks = { ["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true } local quoteLeft, quoteRight = -- Test if start/end are quotation marks quotationMarks[string.sub(title, 1, 1)], quotationMarks[string.sub(title, -1, -1)] if quoteLeft or quoteRight then title = mw.html.create("span"):wikitext(title) end if quoteLeft then title:css("padding-left", "0.15em") end if quoteRight then title:css("padding-right", "0.15em") end return '"' .. tostring(title) .. '"' end -------------------------------------------------------------------------------- -- Hatnote -- -- Produces standard hatnote text. Implements the {{hatnote}} template. -------------------------------------------------------------------------------- function p.hatnote(frame) local args = getArgs(frame) local s = args[1] if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end return p._hatnote(s, { extraclasses = args.extraclasses, selfref = args.selfref }) end function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) options = options or {} local inline = options.inline local hatnote = mw.html.create(inline == 1 and 'span' or 'div') local extraclasses if type(options.extraclasses) == 'string' then extraclasses = options.extraclasses end hatnote :attr('role', 'note') :addClass(p.defaultClasses(inline)) :addClass(extraclasses) :addClass(options.selfref and 'selfref' or nil) :wikitext(s) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' } } .. tostring(hatnote) end return p 3ae1ed7094c5005ca0896395ec9a587287a0bef1 海底小纵队(消歧义) 0 6 16 2022-09-23T17:45:07Z Richard Robin 2 创建页面,内容为“海底小纵队(Octonauts),可被解释为多篇文章: *如果你正在寻找由[[巴克队长]]为领导组成的团队,请进入[[海底小纵队(团队)]]。 *如果您在寻找《海底小纵队》绘本图书的介绍,请进入[[海底小纵队(原作绘本)]]。 *如果您在寻找《海底小纵队》动画剧集的介绍,请进入[[海底小纵队(动画剧集)]]。 **如果您在寻找《海底小纵队》动画剧集第一…” wikitext text/x-wiki 海底小纵队(Octonauts),可被解释为多篇文章: *如果你正在寻找由[[巴克队长]]为领导组成的团队,请进入[[海底小纵队(团队)]]。 *如果您在寻找《海底小纵队》绘本图书的介绍,请进入[[海底小纵队(原作绘本)]]。 *如果您在寻找《海底小纵队》动画剧集的介绍,请进入[[海底小纵队(动画剧集)]]。 **如果您在寻找《海底小纵队》动画剧集第一部的介绍,请进入[[海底小纵队动画(第一季)]]。 **如果您在寻找《海底小纵队》动画剧集第二部的介绍,请进入[[海底小纵队动画(第二季)]]。 **如果您在寻找《海底小纵队》动画剧集第三部的介绍,请进入[[海底小纵队动画(第三季)]]。 **如果您在寻找《海底小纵队》动画剧集第四部的介绍,请进入[[海底小纵队动画(第四季)]]。 **如果您在寻找《海底小纵队》动画剧集第五部的介绍,请进入[[海底小纵队动画(第五季)]]。 **如果您在寻找《海底小纵队》动画剧集第六部的介绍,请进入[[海底小纵队动画(第六季)]]。 *如果您在寻找已于2021年在中国上映的电影的介绍,请进入[[海底小纵队大电影1:火焰之环]]。 *如果您在寻找已于2022年在中国上映的电影的介绍,请进入[[海底小纵队大电影2:洞穴大冒险]]。 d5c5506a64426369354fbef553dca64743f46d44 41 16 2022-09-24T01:29:09Z Richard Robin 2 wikitext text/x-wiki [[文件:OCTONAUTS.png|300px|居中]] 海底小纵队(Octonauts),可被解释为多篇文章: *如果你正在寻找由[[巴克队长]]为领导组成的团队,请进入[[海底小纵队(团队)]]。 *如果您在寻找《海底小纵队》绘本图书的介绍,请进入[[海底小纵队(原作绘本)]]。 *如果您在寻找《海底小纵队》动画剧集的介绍,请进入[[海底小纵队(动画剧集)]]。 **如果您在寻找《海底小纵队》动画剧集第一部的介绍,请进入[[海底小纵队动画(第一季)]]。 **如果您在寻找《海底小纵队》动画剧集第二部的介绍,请进入[[海底小纵队动画(第二季)]]。 **如果您在寻找《海底小纵队》动画剧集第三部的介绍,请进入[[海底小纵队动画(第三季)]]。 **如果您在寻找《海底小纵队》动画剧集第四部的介绍,请进入[[海底小纵队动画(第四季)]]。 **如果您在寻找《海底小纵队》动画剧集第五部的介绍,请进入[[海底小纵队动画(第五季)]]。 **如果您在寻找《海底小纵队》动画剧集第六部的介绍,请进入[[海底小纵队动画(第六季)]]。 *如果您在寻找已于2021年在中国上映的电影的介绍,请进入[[海底小纵队大电影1:火焰之环]]。 *如果您在寻找已于2022年在中国上映的电影的介绍,请进入[[海底小纵队大电影2:洞穴大冒险]]。 2b3f11188b930fe2e7e4abc5b04e4c92b366bb6a 海底小纵队维基:版权 4 7 17 2022-09-23T18:05:14Z Richard Robin 2 创建页面,内容为“海底小纵队维基的原创内容默认基于[https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 <big>您可以自由地:</big> *'''共享''' — 在任何媒介以任何形式复制、发行本作品。 *'''演绎''' — 修改、转换或以本作品为基础进行创作,在任何用途下,甚至商业目的。 只要你遵守许可协议条款,许可人就无法收回你的这些权利。 <big…” wikitext text/x-wiki 海底小纵队维基的原创内容默认基于[https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 <big>您可以自由地:</big> *'''共享''' — 在任何媒介以任何形式复制、发行本作品。 *'''演绎''' — 修改、转换或以本作品为基础进行创作,在任何用途下,甚至商业目的。 只要你遵守许可协议条款,许可人就无法收回你的这些权利。 <big>惟须遵守下列条件:</big> *'''署名''' — 您必须给出适当的署名,提供指向本许可协议的链接,同时标明是否(对原始作品)作了修改。您可以用任何合理的方式来署名,但是不得以任何方式暗示许可人为您或您的使用背书。 *'''相同方式共享''' — 如果您再混合、转换或者基于本作品进行创作,您必须基于'''与原先许可协议相同的许可协议'''分发您贡献的作品。 *'''没有附加限制''' — 您不得适用法律术语或者技术措施从而限制其他人做许可协议允许的事情。 <big>声明:</big> *您不必因为公共领域的作品要素而遵守许可协议,或者您的使用被可适用的例外或限制所允许。 *不提供担保。许可协议可能不会给与您意图使用的所必须的所有许可。例如,其他权利比如形象权、隐私权或人格权可能限制您如何使用作品。 == 免责声明 == '''OCTONAUTSTM OCTOPODTM Meomi Design Inc. OCTONAUTS Copyright © 2021 Vampire Squid Productions Limited. All rights reserved.''' '''Copyright © 2021 Silvergate Media Holdings Limited, registered in England and Wales under company number 08880268,. Registered VAT number 115149928. All rights reserved.''' 海底小纵队(Octonauts)相关的商标权和其它知识产权归原作者 Vicky Wong 和 Michael Murphy、英国Silvergate(银色大门)公司、加拿大Meomi工作室、中国万达宝贝王集团等企划单位或个人所有。海底小纵队维基与上述单位没有任何关联,相关权利不属于以上许可协议授权范围。 海底小纵队维基对《海底小纵队》内容的使用基于著作权法的合理使用原则,绝无侵犯著作权之故意。 [[Category:海底小纵队维基规范]] 4b4914a96b3bff5ac96fec80bd036e0733cbcaed 海底小纵队维基:免责声明 4 8 18 2022-09-23T18:08:50Z Richard Robin 2 创建页面,内容为“<div style="font-size: 2.5em; text-align: center; line-height: 100%; padding: 1em;">'''海底小纵队维基不保证内容的有效性和准确性。'''</div> 我们力求使海底小纵队维基成为专业、准确的在线百科全书。但作为开放的、协作共建的百科系统,任何人都可以向海底小纵队维基提交内容。我们会尽力对用户提交的内容进行检查,但海底小纵队维基的管理员、贡献者和任何相…” wikitext text/x-wiki <div style="font-size: 2.5em; text-align: center; line-height: 100%; padding: 1em;">'''海底小纵队维基不保证内容的有效性和准确性。'''</div> 我们力求使海底小纵队维基成为专业、准确的在线百科全书。但作为开放的、协作共建的百科系统,任何人都可以向海底小纵队维基提交内容。我们会尽力对用户提交的内容进行检查,但海底小纵队维基的管理员、贡献者和任何相关人员不对站点上的任何内容承担任何责任。 如您在海底小纵队维基遇到任何不合适的或对您冒犯的内容,请联系[[Special:用户列表/sysop|管理员]],我们会在收到报告后短时间内移除相关内容。 除非特别说明,海底小纵队维基内文字内容基于 [https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 ==版权声明== 海底小纵队维基对海底小纵队内容的使用基于著作权法的合理使用原则,绝无侵犯著作权之故意。 [[Category:海底小纵队维基|{{PAGENAME}}]] 2b52e51415548e17081667308a3a98b5468004dd 19 18 2022-09-23T18:10:41Z Richard Robin 2 wikitext text/x-wiki <div style="font-size: 2.5em; text-align: center; line-height: 100%; padding: 1em;">'''海底小纵队维基不保证内容的有效性和准确性。'''</div> 我们力求使海底小纵队维基成为专业、准确的在线百科全书。但作为开放的、协作共建的百科系统,任何人都可以向海底小纵队维基提交内容。我们会尽力对用户提交的内容进行检查,但海底小纵队维基的管理员、贡献者和任何相关人员不对站点上的任何内容承担任何责任。 如您在海底小纵队维基遇到任何不合适的或对您冒犯的内容,请联系[[Special:用户列表/sysop|管理员]],我们会在收到报告后短时间内移除相关内容。 除非特别说明,海底小纵队维基内文字内容基于 [https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 ==版权声明== '''OCTONAUTSTM OCTOPODTM Meomi Design Inc. OCTONAUTS Copyright © 2021 Vampire Squid Productions Limited. All rights reserved.''' '''Copyright © 2021 Silvergate Media Holdings Limited, registered in England and Wales under company number 08880268,. Registered VAT number 115149928. All rights reserved.''' 海底小纵队(Octonauts)相关的商标权和其它知识产权归原作者 Vicky Wong 和 Michael Murphy、英国Silvergate(银色大门)公司、加拿大Meomi工作室、中国万达宝贝王集团等企划单位或个人所有。海底小纵队维基与上述单位没有任何关联,相关权利不属于以上许可协议授权范围。 海底小纵队维基对《海底小纵队》内容的使用基于著作权法的合理使用原则,绝无侵犯著作权之故意。 [[Category:海底小纵队维基]] 98119fdfe2a7ff30981f16087fc3d0dea7d44592 20 19 2022-09-23T18:11:29Z Richard Robin 2 补充版权声明内容 wikitext text/x-wiki <div style="font-size: 2.5em; text-align: center; line-height: 100%; padding: 1em;">'''海底小纵队维基不保证内容的有效性和准确性。'''</div> 我们力求使海底小纵队维基成为专业、准确的在线百科全书。但作为开放的、协作共建的百科系统,任何人都可以向海底小纵队维基提交内容。我们会尽力对用户提交的内容进行检查,但海底小纵队维基的管理员、贡献者和任何相关人员不对站点上的任何内容承担任何责任。 如您在海底小纵队维基遇到任何不合适的或对您冒犯的内容,请联系[[Special:用户列表/sysop|管理员]],我们会在收到报告后短时间内移除相关内容。 除非特别说明,海底小纵队维基内文字内容基于 [https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 ==版权声明== '''OCTONAUTSTM OCTOPODTM Meomi Design Inc. OCTONAUTS Copyright © 2021 Vampire Squid Productions Limited. All rights reserved.''' '''Copyright © 2021 Silvergate Media Holdings Limited, registered in England and Wales under company number 08880268,. Registered VAT number 115149928. All rights reserved.''' 海底小纵队(Octonauts)相关的商标权和其它知识产权归原作者 Vicky Wong 和 Michael Murphy、英国Silvergate(银色大门)公司、加拿大Meomi工作室、中国万达宝贝王集团等企划单位或个人所有。海底小纵队维基与上述单位没有任何关联,相关权利不属于以上许可协议授权范围。 海底小纵队维基对《海底小纵队》内容的使用基于著作权法的合理使用原则,绝无侵犯著作权之故意。 [[Category:海底小纵队维基|{{PAGENAME}}]] dcad15f86f16f6b3628145175f2b0e4ad46c1513 Category:海底小纵队维基 14 9 21 2022-09-23T18:11:51Z Richard Robin 2 创建空白页面 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Category:海底小纵队维基规范 14 10 22 2022-09-23T18:12:44Z Richard Robin 2 创建空白页面 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 海底小纵队维基:关于 4 11 23 2022-09-23T18:15:47Z Richard Robin 2 创建页面,内容为“[[文件:海底小纵队维基LOGO.png|300px|居中]] 海底小纵队维基,基于Miraheze的意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素的网站。 本网站的原创内容默认基于[https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。” wikitext text/x-wiki [[文件:海底小纵队维基LOGO.png|300px|居中]] 海底小纵队维基,基于Miraheze的意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素的网站。 本网站的原创内容默认基于[https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 20657a6f0e935b03a6f66b55dc3dcbecb986c8f3 MediaWiki:Licenses 8 12 24 2022-09-23T18:50:02Z Richard Robin 2 创建页面,内容为“* 开放授权 ** PD|公有领域授权 ** Cc-by|知识共享 署名 4.0 协议 ** Cc-by-sa|知识共享 署名-相同方式共享 4.0 协议 ** Cc-by-nc-sa|知识共享 署名-非商业性使用-相同方式共享 4.0 协议 *CC协议 **CC Zero|CC-0(作者授权以无著作权方式使用) **CC BY|CC BY 3.0 (作者授权以署名方式使用,该授权需兼容3.0协议) **CC BY-SA|CC BY-SA 3.0 (作者授权以署名-相同方式共享使用,该授…” wikitext text/x-wiki * 开放授权 ** PD|公有领域授权 ** Cc-by|知识共享 署名 4.0 协议 ** Cc-by-sa|知识共享 署名-相同方式共享 4.0 协议 ** Cc-by-nc-sa|知识共享 署名-非商业性使用-相同方式共享 4.0 协议 *CC协议 **CC Zero|CC-0(作者授权以无著作权方式使用) **CC BY|CC BY 3.0 (作者授权以署名方式使用,该授权需兼容3.0协议) **CC BY-SA|CC BY-SA 3.0 (作者授权以署名-相同方式共享使用,该授权需兼容3.0协议) **CC BY-NC-SA|CC BY-NC-SA 3.0(作者授权以署名-非商业使用-相同方式共享使用,该授权需兼容3.0协议) *公有领域 **PD-Old|作者离世一定年限后流入公有领域 **PD-Other|其他原因流入公有领域 * 其他 **Copyright|原作者保留权利(原作者没有明确的授权声明) **Authorized|原作者授权本网站使用 **可自由使用|可自由使用(作者放弃版权或声明可自由使用) **海底小纵队维基版权所有|海底小纵队维基版权所有 5ae1485e39dc27cb0626365e590d1c3fdcd73148 File:OctonautsTV.jpg 6 13 25 2022-09-23T18:51:47Z Richard Robin 2 《海底小纵队》动画海报 wikitext text/x-wiki == 摘要 == 《海底小纵队》动画海报 == 许可协议 == {{Copyright}} 5adbd42883ebc4aca33f6f7aa2094ae16b85bd66 海底小纵队(动画剧集) 0 14 26 2022-09-23T18:53:25Z Richard Robin 2 创建页面,内容为“[[文件:OctonautsTV.jpg|缩略图|《海底小纵队》动画海报]] '''《海底小纵队》'''(''Octonauts''),是英国银色之门影视公司(Silvegate Media)于2010年开播(中国大陆2014年开播)的儿童动画片,该作品改编自加拿大设计工作室Meomi的同名系列绘本。<br /> 该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及团队协作等内容。动画讲述了八…” wikitext text/x-wiki [[文件:OctonautsTV.jpg|缩略图|《海底小纵队》动画海报]] '''《海底小纵队》'''(''Octonauts''),是英国银色之门影视公司(Silvegate Media)于2010年开播(中国大陆2014年开播)的儿童动画片,该作品改编自加拿大设计工作室Meomi的同名系列绘本。<br /> 该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及团队协作等内容。动画讲述了八个可爱的拟人化小动物组成的海底探险小队的故事。以巴克队长为领导核心,小队集结了医生、生物学家、摄影师、机械工程师等7名伙伴。他们是一群活跃在海底的冒险家,有着各自的爱好与独特的特长,在队长的带领下向着未知的海域不断探索前进。<br /> 目前海底小纵队在中国大陆的版权持有方是万达集团下属的万达宝贝王。 《海底小纵队》在世界已播出第一季50集、第二季22集、第三季20集、第四季26集、第五季27集、第六季28集。 [[分类:海底小纵队]][[分类:动画]] 68ac91c779a6e787afc1fba50b70d0bbf16b1615 55 26 2022-09-24T04:23:00Z Richard Robin 2 wikitext text/x-wiki [[文件:OctonautsTV.jpg|缩略图|《海底小纵队》动画海报]] '''《海底小纵队》'''(''Octonauts''),是英国银色之门影视公司(Silvegate Media)于2010年开播(中国大陆2014年开播)的儿童动画片,该作品改编自加拿大设计工作室Meomi的同名系列绘本。<br /> 该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及团队协作等内容。动画讲述了八个可爱的拟人化小动物组成的海底探险小队的故事。以巴克队长为领导核心,小队集结了医生、生物学家、摄影师、机械工程师等7名伙伴。他们是一群活跃在海底的冒险家,有着各自的爱好与独特的特长,在队长的带领下向着未知的海域不断探索前进。<br /> 目前海底小纵队在中国大陆的版权持有方是万达集团下属的万达宝贝王。 《海底小纵队》在世界已播出第一季50集、第二季22集、第三季20集、第四季26集、第五季27集、第六季26集、第七季26集。 [[分类:海底小纵队]][[分类:动画]] c8ebe9700e76211b1693755dbddd5d7118e6d033 File:Octonauts boxsetfull.png 6 15 27 2022-09-23T19:01:09Z Richard Robin 2 《海底小纵队》原版绘本整盒 wikitext text/x-wiki == 摘要 == 《海底小纵队》原版绘本整盒 == 许可协议 == {{Copyright}} 8180dcea223c75bec8f1e7c41f4444d844f343c3 海底小纵队(原作绘本) 0 16 28 2022-09-23T19:03:33Z Richard Robin 2 创建页面,内容为“[[文件:Octonauts boxsetfull.png|300px|缩略图|《海底小纵队》原版系列封面和包装盒]] === 介绍 === 原著是由Meomi工作室创作的系列绘本,与现在正在播出的动画片注重科普海洋生物的内容不同,原著绘本的内容更侧重于探险,且里面大部分的海洋生物都是虚构的(基于绘本本身的特点)。共6部作品(中国大陆出版发行了4本简体中文翻译版)。 === 人物设计 ==…” wikitext text/x-wiki [[文件:Octonauts boxsetfull.png|300px|缩略图|《海底小纵队》原版系列封面和包装盒]] === 介绍 === 原著是由Meomi工作室创作的系列绘本,与现在正在播出的动画片注重科普海洋生物的内容不同,原著绘本的内容更侧重于探险,且里面大部分的海洋生物都是虚构的(基于绘本本身的特点)。共6部作品(中国大陆出版发行了4本简体中文翻译版)。 === 人物设计 === 原著的人物设计与改编后的动漫的人物设计也略有不同,比如巴克队长在原著里不穿衣服、皮索(皮医生)的帽子和医药盒的标志是蓝色的象征医生的十字<ref>(可能考虑到动画在全球播放的缘故,改编后的皮医生帽子上的十字符号变成了章鱼标志,而医药包上的十字则变成了创可贴)。</ref> === 作者 === Meomi Design Inc是一家加拿大/美国设计工作室,总部位于温哥华和洛杉矶,由黄慧琪(Vicki Wong)和Michael C. Murphy创立。 他们的作品包括温哥华2010年冬季奥运会吉祥物 Miga、Quatchi、Sumi 和 Mukmuk,以及《海底小纵队》,其中《海底小纵队》被改编成动画短片并在国际上播出。 === 分册 === *''[[the Growing Goldfish]]''(暂无中文名) *''[[Explore the Great Big Ocean]]''(暂无中文名) *''The Only Lonely Monster''《[[孤独的大怪兽]]》 *''the Sea of Shade''《[[影子国历险记]]》 *''the Frown Fish''《[[一条不开心的鱼]]》 *''the Great Ghost Reef''《[[幽灵大堡礁]]》 [[分类:海底小纵队]][[分类:图书]][[分类:绘本]] d9cb9f791ee1bac98683a947baf96e1f2781c6e0 39 28 2022-09-24T01:26:44Z Richard Robin 2 wikitext text/x-wiki [[文件:Octonauts boxsetfull.png|300px|缩略图|《海底小纵队》原版系列封面和包装盒]] 《海底小纵队原著绘本故事》是在动画片之前被创作出来的,动画片里生动的形象和部分有趣的故事都来源于这套绘本,它是动画片的鼻祖。全套书共4册,分别是《[[孤独的大怪兽]]》、《[[影子国历险记]]》、《[[一条不开心的鱼]]》和《[[幽灵大堡礁]]》。 <ref>{{cite web | title = 海底小纵队原著绘本故事(套装共4册) (豆瓣) | url = https://book.douban.com/subject/33009774/ | date = 2022-09-24 | archiveurl = http://archive.today/qBSwW | archivedate = 2022-09-24 }}</ref> === 介绍 === 原著是由Meomi工作室创作的系列绘本,与现在正在播出的动画片注重科普海洋生物的内容不同,原著绘本的内容更侧重于探险,且里面大部分的海洋生物都是虚构的(基于绘本本身的特点)。共6部作品(中国大陆出版发行了4本简体中文翻译版)。 === 人物设计 === 原著的人物设计与改编后的动漫的人物设计也略有不同,比如巴克队长在原著里不穿衣服、皮索(皮医生)的帽子和医药盒的标志是蓝色的象征医生的十字<ref>(可能考虑到动画在全球播放的缘故,改编后的皮医生帽子上的十字符号变成了章鱼标志,而医药包上的十字则变成了创可贴)。</ref> === 作者 === Meomi Design Inc是一家加拿大/美国设计工作室,总部位于温哥华和洛杉矶,由黄慧琪(Vicki Wong)和Michael C. Murphy创立。 他们的作品包括温哥华2010年冬季奥运会吉祥物 Miga、Quatchi、Sumi 和 Mukmuk,以及《海底小纵队》,其中《海底小纵队》被改编成动画短片并在国际上播出。 === 分册 === *''The Only Lonely Monster''《[[孤独的大怪兽]]》 *''the Sea of Shade''《[[影子国历险记]]》 *''the Frown Fish''《[[一条不开心的鱼]]》 *''the Great Ghost Reef''《[[幽灵大堡礁]]》 *''[[the Growing Goldfish]]''(暂无中文名) *''[[Explore the Great Big Ocean]]''(暂无中文名) [[分类:海底小纵队]][[分类:图书]][[分类:绘本]] 9c45e6574ac5ba7e7b2292108dcfc3eba360c29a Template:Cite web 10 17 29 2022-09-24T01:08:49Z Richard Robin 2 创建页面,内容为“<includeonly>{{#invoke:citation/CS1|citation |CitationClass=web }}</includeonly><noinclude> {{documentation}} </noinclude>” wikitext text/x-wiki <includeonly>{{#invoke:citation/CS1|citation |CitationClass=web }}</includeonly><noinclude> {{documentation}} </noinclude> ea1b0f38afd9728a1cf9f2e3f540887a402fab8e Template:Documentation 10 18 30 2022-09-24T01:09:23Z Richard Robin 2 创建页面,内容为“<div class="template-documentation" style="background: aliceblue; padding: 1em; border: 1px solid #aaa;"><!-- --><div class="template-documentation-header" style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex"><!-- --><span style="font-weight: bold; font-size: 125%">{{#switch:{{NAMESPACE}} |{{ns:template}}=[[File:Template-info.svg|50px|link=]] 模板文档 |{{ns:module}}=[[File:Template-info.svg|50px|link=]] 模块文档…” wikitext text/x-wiki <div class="template-documentation" style="background: aliceblue; padding: 1em; border: 1px solid #aaa;"><!-- --><div class="template-documentation-header" style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex"><!-- --><span style="font-weight: bold; font-size: 125%">{{#switch:{{NAMESPACE}} |{{ns:template}}=[[File:Template-info.svg|50px|link=]] 模板文档 |{{ns:module}}=[[File:Template-info.svg|50px|link=]] 模块文档 |{{ns:widget}}=[[File:Template-info.svg|50px|link=]] 小工具文档 |#default=文档 }}</span>&nbsp;&nbsp;<span class="editsection plainlinks" style="font-size:small;" id="doc_editlinks">{{#if:{{{content|}}}| <!--内联文档-->[[{{fullurl:{{FULLPAGENAME}}|action=edit}} 编辑]] |{{#ifexist: {{{1|{{Documentation/docname}}}}} |<!--**/doc 存在 **-->[[{{fullurl:{{{1|{{Documentation/docname}}}}}}} 查看]] [[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} 编辑]] [[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} 历史]] |<!--**/doc 不存在**-->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit}} 创建]] }} [[{{fullurl:{{FULLPAGENAME}}|action=purge}} 刷新]] }}</span></div><!-- --><div id="template_doc_page_transcluded" class="dablink plainlinks" style="font-size:84%;"><!-- -->{{#if:{{{content|}}}| <!--内联文档**-->这个[[zhwiki:Wikipedia:模板文件頁模式|文档]]是内联文档。 |{{#ifexist: {{{1|{{Documentation/docname}}}}} |<!--**/doc存在**-->这个[[zhwiki:Wikipedia:模板文件頁模式|文档]][[zhwiki:Wikipedia:嵌入包含|嵌入]]自[[{{{1|{{Documentation/docname}}}}}]]。 }} }} </div> {{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}} </div> <noinclude>[[Category:模板页的模板]]</noinclude> b2f4b57fe4bc552b74c4f20eb3878248fa965326 Module:Citation/CS1 828 19 31 2022-09-24T01:14:13Z Richard Robin 2 创建页面,内容为“--[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local dates, year_date_check -- functions in Module:Citation/CS1/Date_validation local z, is_set, first_set, is_url, split_url, add_maint_cat, add_prop_cat, error_comment, in_array, substitute, set_error -- functions in Module:Citation/CS1/Utilities local extract_ids, build_id_list, is_embargoed, extract_id_access_levels -- functio…” Scribunto text/plain --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local dates, year_date_check -- functions in Module:Citation/CS1/Date_validation local z, is_set, first_set, is_url, split_url, add_maint_cat, add_prop_cat, error_comment, in_array, substitute, set_error -- functions in Module:Citation/CS1/Utilities local extract_ids, build_id_list, is_embargoed, extract_id_access_levels -- functions in Module:Citation/CS1/Identifiers local cfg = {}; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration local whitelist = {}; -- table of tables listing valid template parameter names; defined in Module:Citation/CS1/Whitelist --[[--------------------------< A D D _ V A N C _ E R R O R >---------------------------------------------------- Adds a single Vancouver system error message to the template's output regardless of how many error actually exist. To prevent duplication, added_vanc_errs is nil until an error message is emitted. ]] local added_vanc_errs; -- flag so we only emit one Vancouver error / category local function add_vanc_error () if not added_vanc_errs then added_vanc_errs = true; -- note that we've added this category table.insert( z.message_tail, { set_error( 'vancouver', {}, true ) } ); end end --[[--------------------------< L I N K _ P A R A M _ O K >--------------------------------------------------- checks the content of |title-link=, |series-link=, |author-link= etc for properly formatted content: no wikilinks, no urls Link parameters are to hold the title of a wikipedia article so none of the WP:TITLESPECIALCHARACTERS are allowed: # < > [ ] | { } _ except the underscore which is used as a space in wiki urls and # which is used for section links returns false when the value contains any of these characters. When there are no illegal characters, this function returns TRUE if value DOES NOT appear to be a valid url (the |<param>-link= parameter is ok); else false when value appears to be a valid url (the |<param>-link= parameter is NOT ok). ]] local function link_param_ok (value) local scheme, domain; if value:find ('[<>%[%]|{}]') then -- if any prohibited characters return false; end scheme, domain = split_url (value); -- get scheme or nil and domain or nil from url; return not is_url (scheme, domain); -- return true if value DOES NOT appear to be a valid url end --[[--------------------------< C H E C K _ U R L >------------------------------------------------------------ Determines whether a URL string appears to be valid. First we test for space characters. If any are found, return false. Then split the url into scheme and domain portions, or for protocol relative (//example.com) urls, just the domain. Use is_url() to validate the two portions of the url. If both are valid, or for protocol relative if domain is valid, return true, else false. ]] local function check_url( url_str ) if nil == url_str:match ("^%S+$") then -- if there are any spaces in |url=value it can't be a proper url return false; end local scheme, domain; scheme, domain = split_url (url_str); -- get scheme or nil and domain or nil from url; return is_url (scheme, domain); -- return true if value appears to be a valid url end --[=[-------------------------< I S _ P A R A M E T E R _ E X T _ W I K I L I N K >---------------------------- Return true if a parameter value has a string that begins and ends with square brackets [ and ] and the first non-space characters following the opening bracket appear to be a url. The test will also find external wikilinks that use protocol relative urls. Also finds bare urls. The frontier pattern prevents a match on interwiki links which are similar to scheme:path urls. The tests that find bracketed urls are required because the parameters that call this test (currently |title=, |chapter=, |work=, and |publisher=) may have wikilinks and there are articles or redirects like '//Hus' so, while uncommon, |title=[[//Hus]] is possible as might be [[en://Hus]]. ]=] local function is_parameter_ext_wikilink (value) local scheme, domain; value = value:gsub ('([^%s/])/[%a%d].*', '%1'); -- strip path information (the capture prevents false replacement of '//') if value:match ('%f[%[]%[%a%S*:%S+.*%]') then -- if ext wikilink with scheme and domain: [xxxx://yyyyy.zzz] scheme, domain = value:match ('%f[%[]%[(%a%S*:)(%S+).*%]') elseif value:match ('%f[%[]%[//%S*%.%S+.*%]') then -- if protocol relative ext wikilink: [//yyyyy.zzz] domain = value:match ('%f[%[]%[//(%S*%.%S+).*%]'); elseif value:match ('%a%S*:%S+') then -- if bare url with scheme; may have leading or trailing plain text scheme, domain = value:match ('(%a%S*:)(%S+)'); elseif value:match ('//%S*%.%S+') then -- if protocol relative bare url: //yyyyy.zzz; may have leading or trailing plain text domain = value:match ('//(%S*%.%S+)'); -- what is left should be the domain else return false; -- didn't find anything that is obviously a url end return is_url (scheme, domain); -- return true if value appears to be a valid url end --[[-------------------------< C H E C K _ F O R _ U R L >----------------------------------------------------- loop through a list of parameters and their values. Look at the value and if it has an external link, emit an error message. ]] local function check_for_url (parameter_list) local error_message = ''; for k, v in pairs (parameter_list) do -- for each parameter in the list if is_parameter_ext_wikilink (v) then -- look at the value; if there is a url add an error message if is_set(error_message) then -- once we've added the first portion of the error message ... error_message=error_message .. ", "; -- ... add a comma space separator end error_message=error_message .. "&#124;" .. k .. "="; -- add the failed parameter end end if is_set (error_message) then -- done looping, if there is an error message, display it table.insert( z.message_tail, { set_error( 'param_has_ext_link', {error_message}, true ) } ); end end --[[--------------------------< S A F E _ F O R _ I T A L I C S >---------------------------------------------- Protects a string that will be wrapped in wiki italic markup '' ... '' Note: We cannot use <i> for italics, as the expected behavior for italics specified by ''...'' in the title is that they will be inverted (i.e. unitalicized) in the resulting references. In addition, <i> and '' tend to interact poorly under Mediawiki's HTML tidy. ]] local function safe_for_italics( str ) if not is_set(str) then return str; else if str:sub(1,1) == "'" then str = "<span></span>" .. str; end if str:sub(-1,-1) == "'" then str = str .. "<span></span>"; end -- Remove newlines as they break italics. return str:gsub( '\n', ' ' ); end end --[[--------------------------< S A F E _ F O R _ U R L >------------------------------------------------------ Escape sequences for content that will be used for URL descriptions ]] local function safe_for_url( str ) if str:match( "%[%[.-%]%]" ) ~= nil then table.insert( z.message_tail, { set_error( 'wikilink_in_url', {}, true ) } ); end return str:gsub( '[%[%]\n]', { ['['] = '&#91;', [']'] = '&#93;', ['\n'] = ' ' } ); end --[[--------------------------< W R A P _ S T Y L E >---------------------------------------------------------- Applies styling to various parameters. Supplied string is wrapped using a message_list configuration taking one argument; protects italic styled parameters. Additional text taken from citation_config.presentation - the reason this function is similar to but separate from wrap_msg(). ]] local function wrap_style (key, str) if not is_set( str ) then return ""; elseif in_array( key, { 'italic-title', 'trans-italic-title' } ) then str = safe_for_italics( str ); end return substitute( cfg.presentation[key], {str} ); end --[[--------------------------< E X T E R N A L _ L I N K >---------------------------------------------------- Format an external link with error checking ]] local function external_link( URL, label, source ) local error_str = ""; if not is_set( label ) then label = URL; if is_set( source ) then error_str = set_error( 'bare_url_missing_title', { wrap_style ('parameter', source) }, false, " " ); else error( cfg.messages["bare_url_no_origin"] ); end end if not check_url( URL ) then error_str = set_error( 'bad_url', {wrap_style ('parameter', source)}, false, " " ) .. error_str; end return table.concat({ "[", URL, " ", safe_for_url( label ), "]", error_str }); end --[[--------------------------< D E P R E C A T E D _ P A R A M E T E R >-------------------------------------- Categorize and emit an error message when the citation contains one or more deprecated parameters. The function includes the offending parameter name to the error message. Only one error message is emitted regardless of the number of deprecated parameters in the citation. ]] local page_in_deprecated_cat; -- sticky flag so that the category is added only once local function deprecated_parameter(name) if not page_in_deprecated_cat then page_in_deprecated_cat = true; -- note that we've added this category table.insert( z.message_tail, { set_error( 'deprecated_params', {name}, true ) } ); -- add error message end end --[[--------------------------< K E R N _ Q U O T E S >-------------------------------------------------------- Apply kerning to open the space between the quote mark provided by the Module and a leading or trailing quote mark contained in a |title= or |chapter= parameter's value. This function will positive kern either single or double quotes: "'Unkerned title with leading and trailing single quote marks'" " 'Kerned title with leading and trailing single quote marks' " (in real life the kerning isn't as wide as this example) Double single quotes (italic or bold wikimarkup) are not kerned. Call this function for chapter titles, for website titles, etc; not for book titles. ]] local function kern_quotes (str) local cap=''; local cap2=''; cap, cap2 = str:match ("^([\"\'])([^\'].+)"); -- match leading double or single quote but not double single quotes if is_set (cap) then str = substitute (cfg.presentation['kern-left'], {cap, cap2}); end cap, cap2 = str:match ("^(.+[^\'])([\"\'])$") if is_set (cap) then str = substitute (cfg.presentation['kern-right'], {cap, cap2}); end return str; end --[[--------------------------< F O R M A T _ S C R I P T _ V A L U E >---------------------------------------- |script-title= holds title parameters that are not written in Latin based scripts: Chinese, Japanese, Arabic, Hebrew, etc. These scripts should not be italicized and may be written right-to-left. The value supplied by |script-title= is concatenated onto Title after Title has been wrapped in italic markup. Regardless of language, all values provided by |script-title= are wrapped in <bdi>...</bdi> tags to isolate rtl languages from the English left to right. |script-title= provides a unique feature. The value in |script-title= may be prefixed with a two-character ISO639-1 language code and a colon: |script-title=ja:*** *** (where * represents a Japanese character) Spaces between the two-character code and the colon and the colon and the first script character are allowed: |script-title=ja : *** *** |script-title=ja: *** *** |script-title=ja :*** *** Spaces preceding the prefix are allowed: |script-title = ja:*** *** The prefix is checked for validity. If it is a valid ISO639-1 language code, the lang attribute (lang="ja") is added to the <bdi> tag so that browsers can know the language the tag contains. This may help the browser render the script more correctly. If the prefix is invalid, the lang attribute is not added. At this time there is no error message for this condition. Supports |script-title= and |script-chapter= TODO: error messages when prefix is invalid ISO639-1 code; when script_value has prefix but no script; ]] local function format_script_value (script_value) local lang=''; -- initialize to empty string local name; if script_value:match('^%l%l%s*:') then -- if first 3 non-space characters are script language prefix lang = script_value:match('^(%l%l)%s*:%s*%S.*'); -- get the language prefix or nil if there is no script if not is_set (lang) then return ''; -- script_value was just the prefix so return empty string end -- if we get this far we have prefix and script name = mw.language.fetchLanguageName( lang, mw.getContentLanguage():getCode() ); -- get language name so that we can use it to categorize if is_set (name) then -- is prefix a proper ISO 639-1 language code? script_value = script_value:gsub ('^%l%l%s*:%s*', ''); -- strip prefix from script -- is prefix one of these language codes? if in_array (lang, {'ar', 'bg', 'bs', 'dv', 'el', 'fa', 'he', 'hy', 'ja', 'ka', 'ko', 'ku', 'mk', 'ps', 'ru', 'sd', 'sr', 'th', 'uk', 'ug', 'yi', 'zh'}) then add_prop_cat ('script_with_name', {name, lang}) else add_prop_cat ('script') end lang = ' lang="' .. lang .. '" '; -- convert prefix into a lang attribute else lang = ''; -- invalid so set lang to empty string end end if is_set(script_value) then script_value = '-{R|' .. script_value .. '}-'; end script_value = substitute (cfg.presentation['bdi'], {lang, script_value}); -- isolate in case script is rtl return script_value; end --[[--------------------------< S C R I P T _ C O N C A T E N A T E >------------------------------------------ Initially for |title= and |script-title=, this function concatenates those two parameter values after the script value has been wrapped in <bdi> tags. ]] local function script_concatenate (title, script) if is_set(title) then title = '-{' .. title .. '}-'; end if is_set (script) then script = format_script_value (script); -- <bdi> tags, lang atribute, categorization, etc; returns empty string on error if is_set (script) then title = title .. ' ' .. script; -- concatenate title and script title end end return title; end --[[--------------------------< W R A P _ M S G >-------------------------------------------------------------- Applies additional message text to various parameter values. Supplied string is wrapped using a message_list configuration taking one argument. Supports lower case text for {{citation}} templates. Additional text taken from citation_config.messages - the reason this function is similar to but separate from wrap_style(). ]] local function wrap_msg (key, str, lower) if not is_set( str ) then return ""; end if true == lower then local msg; msg = cfg.messages[key]:lower(); -- set the message to lower case before return substitute( msg, str ); -- including template text else return substitute( cfg.messages[key], str ); end end --[[-------------------------< I S _ A L I A S _ U S E D >----------------------------------------------------- This function is used by select_one() to determine if one of a list of alias parameters is in the argument list provided by the template. Input: args – pointer to the arguments table from calling template alias – one of the list of possible aliases in the aliases lists from Module:Citation/CS1/Configuration index – for enumerated parameters, identifies which one enumerated – true/false flag used choose how enumerated aliases are examined value – value associated with an alias that has previously been selected; nil if not yet selected selected – the alias that has previously been selected; nil if not yet selected error_list – list of aliases that are duplicates of the alias already selected Returns: value – value associated with alias we selected or that was previously selected or nil if an alias not yet selected selected – the alias we selected or the alias that was previously selected or nil if an alias not yet selected ]] local function is_alias_used (args, alias, index, enumerated, value, selected, error_list) if enumerated then -- is this a test for an enumerated parameters? alias = alias:gsub ('#', index); -- replace '#' with the value in index else alias = alias:gsub ('#', ''); -- remove '#' if it exists end if is_set(args[alias]) then -- alias is in the template's argument list if value ~= nil and selected ~= alias then -- if we have already selected one of the aliases local skip; for _, v in ipairs(error_list) do -- spin through the error list to see if we've added this alias if v == alias then skip = true; break; -- has been added so stop looking end end if not skip then -- has not been added so table.insert( error_list, alias ); -- add error alias to the error list end else value = args[alias]; -- not yet selected an alias, so select this one selected = alias; end end return value, selected; -- return newly selected alias, or previously selected alias end --[[--------------------------< S E L E C T _ O N E >---------------------------------------------------------- Chooses one matching parameter from a list of parameters to consider. The list of parameters to consider is just names. For parameters that may be enumerated, the position of the numerator in the parameter name is identified by the '#' so |author-last1= and |author1-last= are represented as 'author-last#' and 'author#-last'. Because enumerated parameter |<param>1= is an alias of |<param>= we must test for both possibilities. Generates an error if more than one match is present. ]] local function select_one( args, aliases_list, error_condition, index ) local value = nil; -- the value assigned to the selected parameter local selected = ''; -- the name of the parameter we have chosen local error_list = {}; if index ~= nil then index = tostring(index); end for _, alias in ipairs( aliases_list ) do -- for each alias in the aliases list if alias:match ('#') then -- if this alias can be enumerated if '1' == index then -- when index is 1 test for enumerated and non-enumerated aliases value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- first test for non-enumerated alias end value, selected = is_alias_used (args, alias, index, true, value, selected, error_list); -- test for enumerated alias else value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); --test for non-enumerated alias end end if #error_list > 0 and 'none' ~= error_condition then -- for cases where this code is used outside of extract_names() local error_str = ""; for _, k in ipairs( error_list ) do if error_str ~= "" then error_str = error_str .. cfg.messages['parameter-separator'] end error_str = error_str .. wrap_style ('parameter', k); end if #error_list > 1 then error_str = error_str .. cfg.messages['parameter-final-separator']; else error_str = error_str .. cfg.messages['parameter-pair-separator']; end error_str = error_str .. wrap_style ('parameter', selected); table.insert( z.message_tail, { set_error( error_condition, {error_str}, true ) } ); end return value, selected; end --[[--------------------------< F O R M A T _ C H A P T E R _ T I T L E >-------------------------------------- Format the four chapter parameters: |script-chapter=, |chapter=, |trans-chapter=, and |chapter-url= into a single Chapter meta- parameter (chapter_url_source used for error messages). ]] local function format_chapter_title (scriptchapter, chapter, transchapter, chapterurl, chapter_url_source, no_quotes) local chapter_error = ''; if not is_set (chapter) then chapter = ''; -- to be safe for concatenation else if false == no_quotes then chapter = kern_quotes (chapter); -- if necessary, separate chapter title's leading and trailing quote marks from Module provided quote marks chapter = wrap_style ('quoted-title', chapter); end end chapter = script_concatenate (chapter, scriptchapter) -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped if is_set (transchapter) then transchapter = wrap_style ('trans-quoted-title', transchapter); if is_set (chapter) then chapter = chapter .. ' ' .. transchapter; else -- here when transchapter without chapter or script-chapter chapter = transchapter; -- chapter_error = ' ' .. set_error ('trans_missing_title', {'chapter'}); end end if is_set (chapterurl) then chapter = external_link (chapterurl, chapter, chapter_url_source); -- adds bare_url_missing_title error if appropriate end return chapter .. chapter_error; end --[[--------------------------< H A S _ I N V I S I B L E _ C H A R S >---------------------------------------- This function searches a parameter's value for nonprintable or invisible characters. The search stops at the first match. This function will detect the visible replacement character when it is part of the wikisource. Detects but ignores nowiki and math stripmarkers. Also detects other named stripmarkers (gallery, math, pre, ref) and identifies them with a slightly different error message. See also coins_cleanup(). Detects but ignores the character pattern that results from the transclusion of {{'}} templates. Output of this function is an error message that identifies the character or the Unicode group, or the stripmarker that was detected along with its position (or, for multi-byte characters, the position of its first byte) in the parameter value. ]] local function has_invisible_chars (param, v) local position = ''; -- position of invisible char or starting position of stripmarker local dummy; -- end of matching string; not used but required to hold end position when a capture is returned local capture; -- used by stripmarker detection to hold name of the stripmarker local i=1; local stripmarker, apostrophe; while cfg.invisible_chars[i] do local char=cfg.invisible_chars[i][1] -- the character or group name local pattern=cfg.invisible_chars[i][2] -- the pattern used to find it position, dummy, capture = mw.ustring.find (v, pattern) -- see if the parameter value contains characters that match the pattern if position then if 'nowiki' == capture or 'math' == capture or -- nowiki and math stripmarkers (not an error condition) ('templatestyles' == capture) then -- templatestyles stripmarker allowed stripmarker = true; -- set a flag elseif true == stripmarker and 'delete' == char then -- because stripmakers begin and end with the delete char, assume that we've found one end of a stripmarker position = nil; -- unset elseif 'apostrophe' == char then -- apostrophe template uses &zwj;, hair space and zero-width space apostrophe = true; elseif true == apostrophe and in_array (char, {'zero width joiner', 'zero width space', 'hair space'}) then position = nil; -- unset else local err_msg; if capture then err_msg = capture .. ' ' .. cfg.invisible_chars[i][3] or char; else err_msg = cfg.invisible_chars[i][3] or (char .. ' character'); end table.insert( z.message_tail, { set_error( 'invisible_char', {err_msg, wrap_style ('parameter', param), position}, true ) } ); -- add error message return; -- and done with this parameter end end i=i+1; -- bump our index end end --[[--------------------------< A R G U M E N T _ W R A P P E R >---------------------------------------------- Argument wrapper. This function provides support for argument mapping defined in the configuration file so that multiple names can be transparently aliased to single internal variable. ]] local function argument_wrapper( args ) local origin = {}; return setmetatable({ ORIGIN = function( self, k ) local dummy = self[k]; --force the variable to be loaded. return origin[k]; end }, { __index = function ( tbl, k ) if origin[k] ~= nil then return nil; end local args, list, v = args, cfg.aliases[k]; if type( list ) == 'table' then v, origin[k] = select_one( args, list, 'redundant_parameters' ); if origin[k] == nil then origin[k] = ''; -- Empty string, not nil end elseif list ~= nil then v, origin[k] = args[list], list; else -- maybe let through instead of raising an error? -- v, origin[k] = args[k], k; error( cfg.messages['unknown_argument_map'] ); end -- Empty strings, not nil; if v == nil then v = cfg.defaults[k] or ''; origin[k] = ''; end tbl = rawset( tbl, k, v ); return v; end, }); end --[[--------------------------< V A L I D A T E >-------------------------------------------------------------- Looks for a parameter's name in the whitelist. Parameters in the whitelist can have three values: true - active, supported parameters false - deprecated, supported parameters nil - unsupported parameters ]] local function validate( name ) local name = tostring( name ); local state = whitelist.basic_arguments[ name ]; -- Normal arguments if true == state then return true; end -- valid actively supported parameter if false == state then deprecated_parameter (name); -- parameter is deprecated but still supported return true; end -- Arguments with numbers in them name = name:gsub( "%d+", "#" ); -- replace digit(s) with # (last25 becomes last# state = whitelist.numbered_arguments[ name ]; if true == state then return true; end -- valid actively supported parameter if false == state then deprecated_parameter (name); -- parameter is deprecated but still supported return true; end return false; -- Not supported because not found or name is set to nil end --[[--------------------------< N O W R A P _ D A T E >-------------------------------------------------------- When date is YYYY-MM-DD format wrap in nowrap span: <span ...>YYYY-MM-DD</span>. When date is DD MMMM YYYY or is MMMM DD, YYYY then wrap in nowrap span: <span ...>DD MMMM</span> YYYY or <span ...>MMMM DD,</span> YYYY DOES NOT yet support MMMM YYYY or any of the date ranges. ]] local function nowrap_date (date) local cap=''; local cap2=''; if date:match("^%d%d%d%d%-%d%d%-%d%d$") then date = substitute (cfg.presentation['nowrap1'], date); elseif date:match("^%a+%s*%d%d?,%s+%d%d%d%d$") or date:match ("^%d%d?%s*%a+%s+%d%d%d%d$") then cap, cap2 = string.match (date, "^(.*)%s+(%d%d%d%d)$"); date = substitute (cfg.presentation['nowrap2'], {cap, cap2}); end return date; end --[[--------------------------< S E T _ T I T L E T Y P E >---------------------------------------------------- This function sets default title types (equivalent to the citation including |type=<default value>) for those templates that have defaults. Also handles the special case where it is desirable to omit the title type from the rendered citation (|type=none). ]] local function set_titletype (cite_class, title_type) if is_set(title_type) then if "none" == title_type then title_type = ""; -- if |type=none then type parameter not displayed end return title_type; -- if |type= has been set to any other value use that value end return cfg.title_types [cite_class] or ''; -- set template's default title type; else empty string for concatenation end --[[--------------------------< C L E A N _ I S B N >---------------------------------------------------------- Removes irrelevant text and dashes from ISBN number Similar to that used for Special:BookSources ]] local function clean_isbn( isbn_str ) return isbn_str:gsub( "[^-0-9X]", "" ); end --[[--------------------------< E S C A P E _ L U A _ M A G I C _ C H A R S >---------------------------------- Returns a string where all of lua's magic characters have been escaped. This is important because functions like string.gsub() treat their pattern and replace strings as patterns, not literal strings. ]] local function escape_lua_magic_chars (argument) argument = argument:gsub("%%", "%%%%"); -- replace % with %% argument = argument:gsub("([%^%$%(%)%.%[%]%*%+%-%?])", "%%%1"); -- replace all other lua magic pattern characters return argument; end --[[--------------------------< S T R I P _ A P O S T R O P H E _ M A R K U P >-------------------------------- Strip wiki italic and bold markup from argument so that it doesn't contaminate COinS metadata. This function strips common patterns of apostrophe markup. We presume that editors who have taken the time to markup a title have, as a result, provided valid markup. When they don't, some single apostrophes are left behind. ]] local function strip_apostrophe_markup (argument) if not is_set (argument) then return argument; end while true do if argument:match ("%'%'%'%'%'") then -- bold italic (5) argument=argument:gsub("%'%'%'%'%'", ""); -- remove all instances of it elseif argument:match ("%'%'%'%'") then -- italic start and end without content (4) argument=argument:gsub("%'%'%'%'", ""); elseif argument:match ("%'%'%'") then -- bold (3) argument=argument:gsub("%'%'%'", ""); elseif argument:match ("%'%'") then -- italic (2) argument=argument:gsub("%'%'", ""); else break; end end return argument; -- done end --[[--------------------------< M A K E _ C O I N S _ T I T L E >---------------------------------------------- Makes a title for COinS from Title and / or ScriptTitle (or any other name-script pairs) Apostrophe markup (bold, italics) is stripped from each value so that the COinS metadata isn't correupted with strings of %27%27... ]] local function make_coins_title (title, script) if is_set (title) then title = strip_apostrophe_markup (title); -- strip any apostrophe markup else title=''; -- if not set, make sure title is an empty string end if is_set (script) then script = script:gsub ('^%l%l%s*:%s*', ''); -- remove language prefix if present (script value may now be empty string) script = strip_apostrophe_markup (script); -- strip any apostrophe markup else script=''; -- if not set, make sure script is an empty string end if is_set (title) and is_set (script) then script = ' ' .. script; -- add a space before we concatenate end return title .. script; -- return the concatenation end --[[--------------------------< G E T _ C O I N S _ P A G E S >------------------------------------------------ Extract page numbers from external wikilinks in any of the |page=, |pages=, or |at= parameters for use in COinS. ]] local function get_coins_pages (pages) local pattern; if not is_set (pages) then return pages; end -- if no page numbers then we're done while true do pattern = pages:match("%[(%w*:?//[^ ]+%s+)[%w%d].*%]"); -- pattern is the opening bracket, the url and following space(s): "[url " if nil == pattern then break; end -- no more urls pattern = escape_lua_magic_chars (pattern); -- pattern is not a literal string; escape lua's magic pattern characters pages = pages:gsub(pattern, ""); -- remove as many instances of pattern as possible end pages = pages:gsub("[%[%]]", ""); -- remove the brackets pages = pages:gsub("–", "-" ); -- replace endashes with hyphens pages = pages:gsub("&%w+;", "-" ); -- and replace html entities (&ndash; etc.) with hyphens; do we need to replace numerical entities like &#32; and the like? return pages; end -- Gets the display text for a wikilink like [[A|B]] or [[B]] gives B local function remove_wiki_link( str ) return (str:gsub( "%[%[([^%[%]]*)%]%]", function(l) return l:gsub( "^[^|]*|(.*)$", "%1" ):gsub("^%s*(.-)%s*$", "%1"); end)); end -- Converts a hyphen to a dash local function hyphen_to_dash( str ) if not is_set(str) or str:match( "[%[%]{}<>]" ) ~= nil then return str; end return str:gsub( '-', '–' ); end --[[--------------------------< S A F E _ J O I N >------------------------------------------------------------ Joins a sequence of strings together while checking for duplicate separation characters. ]] local function safe_join( tbl, duplicate_char ) --[[ Note: we use string functions here, rather than ustring functions. This has considerably faster performance and should work correctly as long as the duplicate_char is strict ASCII. The strings in tbl may be ASCII or UTF8. ]] local str = ''; -- the output string local comp = ''; -- what does 'comp' mean? local end_chr = ''; local trim; for _, value in ipairs( tbl ) do if value == nil then value = ''; end if str == '' then -- if output string is empty str = value; -- assign value to it (first time through the loop) elseif value ~= '' then if value:sub(1,1) == '<' then -- Special case of values enclosed in spans and other markup. comp = value:gsub( "%b<>", "" ); -- remove html markup (<span>string</span> -> string) else comp = value; end -- typically duplicate_char is sepc if comp:sub(1,1) == duplicate_char then -- is first charactier same as duplicate_char? why test first character? -- Because individual string segments often (always?) begin with terminal punct for th -- preceding segment: 'First element' .. 'sepc next element' .. etc? trim = false; end_chr = str:sub(-1,-1); -- get the last character of the output string -- str = str .. "<HERE(enchr=" .. end_chr.. ")" -- debug stuff? if end_chr == duplicate_char then -- if same as separator str = str:sub(1,-2); -- remove it elseif end_chr == "'" then -- if it might be wikimarkup if str:sub(-3,-1) == duplicate_char .. "''" then -- if last three chars of str are sepc'' str = str:sub(1, -4) .. "''"; -- remove them and add back '' elseif str:sub(-5,-1) == duplicate_char .. "]]''" then -- if last five chars of str are sepc]]'' trim = true; -- why? why do this and next differently from previous? elseif str:sub(-4,-1) == duplicate_char .. "]''" then -- if last four chars of str are sepc]'' trim = true; -- same question end elseif end_chr == "]" then -- if it might be wikimarkup if str:sub(-3,-1) == duplicate_char .. "]]" then -- if last three chars of str are sepc]] wikilink trim = true; elseif str:sub(-2,-1) == duplicate_char .. "]" then -- if last two chars of str are sepc] external link trim = true; elseif str:sub(-4,-1) == duplicate_char .. "'']" then -- normal case when |url=something & |title=Title. trim = true; end elseif end_chr == " " then -- if last char of output string is a space if str:sub(-2,-1) == duplicate_char .. " " then -- if last two chars of str are <sepc><space> str = str:sub(1,-3); -- remove them both end end if trim then if value ~= comp then -- value does not equal comp when value contains html markup local dup2 = duplicate_char; if dup2:match( "%A" ) then dup2 = "%" .. dup2; end -- if duplicate_char not a letter then escape it value = value:gsub( "(%b<>)" .. dup2, "%1", 1 ) -- remove duplicate_char if it follows html markup else value = value:sub( 2, -1 ); -- remove duplicate_char when it is first character end end end str = str .. value; --add it to the output string end end return str; end --[[--------------------------< I S _ G O O D _ V A N C _ N A M E >-------------------------------------------- For Vancouver Style, author/editor names are supposed to be rendered in Latin (read ASCII) characters. When a name uses characters that contain diacritical marks, those characters are to converted to the corresponding Latin character. When a name is written using a non-Latin alphabet or logogram, that name is to be transliterated into Latin characters. These things are not currently possible in this module so are left to the editor to do. This test allows |first= and |last= names to contain any of the letters defined in the four Unicode Latin character sets [http://www.unicode.org/charts/PDF/U0000.pdf C0 Controls and Basic Latin] 0041–005A, 0061–007A [http://www.unicode.org/charts/PDF/U0080.pdf C1 Controls and Latin-1 Supplement] 00C0–00D6, 00D8–00F6, 00F8–00FF [http://www.unicode.org/charts/PDF/U0100.pdf Latin Extended-A] 0100–017F [http://www.unicode.org/charts/PDF/U0180.pdf Latin Extended-B] 0180–01BF, 01C4–024F |lastn= also allowed to contain hyphens, spaces, and apostrophes. (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/) |firstn= also allowed to contain hyphens, spaces, apostrophes, and periods At the time of this writing, I had to write the 'if nil == mw.ustring.find ...' test ouside of the code editor and paste it here because the code editor gets confused between character insertion point and cursor position. ]] local function is_good_vanc_name (last, first) if nil == mw.ustring.find (last, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%'%.]*$") then add_vanc_error (); return false; -- not a string of latin characters; Vancouver required Romanization end; return true; end --[[--------------------------< R E D U C E _ T O _ I N I T I A L S >------------------------------------------ Attempts to convert names to initials in support of |name-list-format=vanc. Names in |firstn= may be separated by spaces or hyphens, or for initials, a period. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35062/. Vancouver style requires family rank designations (Jr, II, III, etc) to be rendered as Jr, 2nd, 3rd, etc. This form is not currently supported by this code so correctly formed names like Smith JL 2nd are converted to Smith J2. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35085/. This function uses ustring functions because firstname initials may be any of the unicode Latin characters accepted by is_good_vanc_name (). ]] local function reduce_to_initials(first) if mw.ustring.match(first, "^%u%u$") then return first end; -- when first contains just two upper-case letters, nothing to do local initials = {} local i = 0; -- counter for number of initials for word in mw.ustring.gmatch(first, "[^%s%.%-]+") do -- names separated by spaces, hyphens, or periods table.insert(initials, mw.ustring.sub(word,1,1)) -- Vancouver format does not include full stops. i = i + 1; -- bump the counter if 2 <= i then break; end -- only two initials allowed in Vancouver system; if 2, quit end return table.concat(initials) -- Vancouver format does not include spaces. end --[[--------------------------< L I S T _ P E O P L E >------------------------------------------------------- Formats a list of people (e.g. authors / editors) ]] local function list_people(control, people, etal, list_name) -- TODO: why is list_name here? not used in this function local sep; local namesep; local format = control.format local maximum = control.maximum local lastauthoramp = control.lastauthoramp; local text = {} if 'vanc' == format then -- Vancouver-like author/editor name styling? sep = ','; -- name-list separator between authors is a comma namesep = ' '; -- last/first separator is a space else sep = ';' -- name-list separator between authors is a semicolon namesep = ', ' -- last/first separator is <comma><space> end if sep:sub(-1,-1) ~= " " then sep = sep .. " " end if is_set (maximum) and maximum < 1 then return "", 0; end -- returned 0 is for EditorCount; not used for authors for i,person in ipairs(people) do if is_set(person.last) then local mask = person.mask local one local sep_one = sep; if is_set (maximum) and i > maximum then etal = true; break; elseif (mask ~= nil) then local n = tonumber(mask) if (n ~= nil) then one = string.rep("&mdash;",n) else one = mask; sep_one = " "; end else one = person.last local first = person.first if is_set(first) then if ( "vanc" == format ) then -- if vancouver format one = one:gsub ('%.', ''); -- remove periods from surnames (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/) if not person.corporate and is_good_vanc_name (one, first) then -- and name is all Latin characters; corporate authors not tested first = reduce_to_initials(first) -- attempt to convert first name(s) to initials end end one = one .. namesep .. first end if is_set(person.link) and person.link ~= control.page_name then one = "[[" .. person.link .. "|" .. one .. "]]" -- link author/editor if this page is not the author's/editor's page end end table.insert( text, one ) table.insert( text, sep_one ) end end local count = #text / 2; -- (number of names + number of separators) divided by 2 if count > 0 then if count > 1 and is_set(lastauthoramp) and not etal then text[#text-2] = " & "; -- replace last separator with ampersand text end text[#text] = nil; -- erase the last separator end local result = table.concat(text) -- construct list if etal and is_set (result) then -- etal may be set by |display-authors=etal but we might not have a last-first list result = result .. sep .. ' ' .. cfg.messages['et al']; -- we've go a last-first list and etal so add et al. end return result, count end --[[--------------------------< A N C H O R _ I D >------------------------------------------------------------ Generates a CITEREF anchor ID if we have at least one name or a date. Otherwise returns an empty string. namelist is one of the contributor-, author-, or editor-name lists chosen in that order. year is Year or anchor_year. ]] local function anchor_id (namelist, year) local names={}; -- a table for the one to four names and year for i,v in ipairs (namelist) do -- loop through the list and take up to the first four last names names[i] = v.last if i == 4 then break end -- if four then done end table.insert (names, year); -- add the year at the end local id = table.concat(names); -- concatenate names and year for CITEREF id if is_set (id) then -- if concatenation is not an empty string return "CITEREF" .. id; -- add the CITEREF portion else return ''; -- return an empty string; no reason to include CITEREF id in this citation end end --[[--------------------------< N A M E _ H A S _ E T A L >---------------------------------------------------- Evaluates the content of author and editor name parameters for variations on the theme of et al. If found, the et al. is removed, a flag is set to true and the function returns the modified name and the flag. This function never sets the flag to false but returns it's previous state because it may have been set by previous passes through this function or by the parameters |display-authors=etal or |display-editors=etal ]] local function name_has_etal (name, etal, nocat) if is_set (name) then -- name can be nil in which case just return local etal_pattern = "[;,]? *[\"']*%f[%a][Ee][Tt] *[Aa][Ll][%.\"']*$" -- variations on the 'et al' theme local others_pattern = "[;,]? *%f[%a]and [Oo]thers"; -- and alternate to et al. if name:match (etal_pattern) then -- variants on et al. name = name:gsub (etal_pattern, ''); -- if found, remove etal = true; -- set flag (may have been set previously here or by |display-authors=etal) if not nocat then -- no categorization for |vauthors= add_maint_cat ('etal'); -- and add a category if not already added end elseif name:match (others_pattern) then -- if not 'et al.', then 'and others'? name = name:gsub (others_pattern, ''); -- if found, remove etal = true; -- set flag (may have been set previously here or by |display-authors=etal) if not nocat then -- no categorization for |vauthors= add_maint_cat ('etal'); -- and add a category if not already added end end end return name, etal; -- end --[[--------------------------< E X T R A C T _ N A M E S >---------------------------------------------------- Gets name list from the input arguments Searches through args in sequential order to find |lastn= and |firstn= parameters (or their aliases), and their matching link and mask parameters. Stops searching when both |lastn= and |firstn= are not found in args after two sequential attempts: found |last1=, |last2=, and |last3= but doesn't find |last4= and |last5= then the search is done. This function emits an error message when there is a |firstn= without a matching |lastn=. When there are 'holes' in the list of last names, |last1= and |last3= are present but |last2= is missing, an error message is emitted. |lastn= is not required to have a matching |firstn=. When an author or editor parameter contains some form of 'et al.', the 'et al.' is stripped from the parameter and a flag (etal) returned that will cause list_people() to add the static 'et al.' text from Module:Citation/CS1/Configuration. This keeps 'et al.' out of the template's metadata. When this occurs, the page is added to a maintenance category. ]] local function extract_names(args, list_name) local names = {}; -- table of names local last; -- individual name components local first; local link; local mask; local i = 1; -- loop counter/indexer local n = 1; -- output table indexer local count = 0; -- used to count the number of times we haven't found a |last= (or alias for authors, |editor-last or alias for editors) local etal=false; -- return value set to true when we find some form of et al. in an author parameter local err_msg_list_name = list_name:match ("(%w+)List") .. 's list'; -- modify AuthorList or EditorList for use in error messages if necessary while true do last = select_one( args, cfg.aliases[list_name .. '-Last'], 'redundant_parameters', i ); -- search through args for name components beginning at 1 first = select_one( args, cfg.aliases[list_name .. '-First'], 'redundant_parameters', i ); link = select_one( args, cfg.aliases[list_name .. '-Link'], 'redundant_parameters', i ); mask = select_one( args, cfg.aliases[list_name .. '-Mask'], 'redundant_parameters', i ); last, etal = name_has_etal (last, etal, false); -- find and remove variations on et al. first, etal = name_has_etal (first, etal, false); -- find and remove variations on et al. if first and not last then -- if there is a firstn without a matching lastn table.insert( z.message_tail, { set_error( 'first_missing_last', {err_msg_list_name, i}, true ) } ); -- add this error message elseif not first and not last then -- if both firstn and lastn aren't found, are we done? count = count + 1; -- number of times we haven't found last and first if 2 <= count then -- two missing names and we give up break; -- normal exit or there is a two-name hole in the list; can't tell which end else -- we have last with or without a first if is_set (link) and false == link_param_ok (link) then -- do this test here in case link is missing last table.insert( z.message_tail, { set_error( 'bad_paramlink', list_name:match ("(%w+)List"):lower() .. '-link' .. i )}); -- url or wikilink in author link; end names[n] = {last = last, first = first, link = link, mask = mask, corporate=false}; -- add this name to our names list (corporate for |vauthors= only) n = n + 1; -- point to next location in the names table if 1 == count then -- if the previous name was missing table.insert( z.message_tail, { set_error( 'missing_name', {err_msg_list_name, i-1}, true ) } ); -- add this error message end count = 0; -- reset the counter, we're looking for two consecutive missing names end i = i + 1; -- point to next args location end return names, etal; -- all done, return our list of names end --[[--------------------------< C O I N S _ C L E A N U P >---------------------------------------------------- Cleanup parameter values for the metadata by removing or replacing invisible characters and certain html entities. 2015-12-10: there is a bug in mw.text.unstripNoWiki (). It replaced math stripmarkers with the appropriate content when it shouldn't. See https://phabricator.wikimedia.org/T121085 and Wikipedia_talk:Lua#stripmarkers_and_mw.text.unstripNoWiki.28.29 TODO: move the replacement patterns and replacement values into a table in /Configuration similar to the invisible characters table? ]] local function coins_cleanup (value) value = mw.text.unstripNoWiki (value); -- replace nowiki stripmarkers with their content value = value:gsub ('<span class="nowrap" style="padding%-left:0%.1em;">&#39;s</span>', "'s"); -- replace {{'s}} template with simple apostrophe-s value = value:gsub ('&zwj;\226\128\138\039\226\128\139', "'"); -- replace {{'}} with simple apostrophe value = value:gsub ('\226\128\138\039\226\128\139', "'"); -- replace {{'}} with simple apostrophe (as of 2015-12-11) value = value:gsub ('&nbsp;', ' '); -- replace &nbsp; entity with plain space value = value:gsub ('\226\128\138', ' '); -- replace hair space with plain space value = value:gsub ('&zwj;', ''); -- remove &zwj; entities value = value:gsub ('[\226\128\141\226\128\139]', '') -- remove zero-width joiner, zero-width space value = value:gsub ('[\194\173\009\010\013]', ' '); -- replace soft hyphen, horizontal tab, line feed, carriage return with plain space return value; end --[[--------------------------< C O I N S >-------------------------------------------------------------------- COinS metadata (see <http://ocoins.info/>) allows automated tools to parse the citation information. ]] local function COinS(data, class) if 'table' ~= type(data) or nil == next(data) then return ''; end for k, v in pairs (data) do -- spin through all of the metadata parameter values if 'ID_list' ~= k and 'Authors' ~= k then -- except the ID_list and Author tables (author nowiki stripmarker done when Author table processed) data[k] = coins_cleanup (v); end end local ctx_ver = "Z39.88-2004"; -- treat table strictly as an array with only set values. local OCinSoutput = setmetatable( {}, { __newindex = function(self, key, value) if is_set(value) then rawset( self, #self+1, table.concat{ key, '=', mw.uri.encode( remove_wiki_link( value ) ) } ); end end }); if in_array (class, {'arxiv', 'journal', 'news'}) or (in_array (class, {'conference', 'interview', 'map', 'press release', 'web'}) and is_set(data.Periodical)) or ('citation' == class and is_set(data.Periodical) and not is_set (data.Encyclopedia)) then OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:journal"; -- journal metadata identifier if 'arxiv' == class then -- set genre according to the type of citation template we are rendering OCinSoutput["rft.genre"] = "preprint"; -- cite arxiv elseif 'conference' == class then OCinSoutput["rft.genre"] = "conference"; -- cite conference (when Periodical set) elseif 'web' == class then OCinSoutput["rft.genre"] = "unknown"; -- cite web (when Periodical set) else OCinSoutput["rft.genre"] = "article"; -- journal and other 'periodical' articles end OCinSoutput["rft.jtitle"] = data.Periodical; -- journal only if is_set (data.Map) then OCinSoutput["rft.atitle"] = data.Map; -- for a map in a periodical else OCinSoutput["rft.atitle"] = data.Title; -- all other 'periodical' article titles end -- these used onlu for periodicals OCinSoutput["rft.ssn"] = data.Season; -- keywords: winter, spring, summer, fall OCinSoutput["rft.chron"] = data.Chron; -- free-form date components OCinSoutput["rft.volume"] = data.Volume; -- does not apply to books OCinSoutput["rft.issue"] = data.Issue; OCinSoutput["rft.pages"] = data.Pages; -- also used in book metadata elseif 'thesis' ~= class then -- all others except cite thesis are treated as 'book' metadata; genre distinguishes OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:book"; -- book metadata identifier if 'report' == class or 'techreport' == class then -- cite report and cite techreport OCinSoutput["rft.genre"] = "report"; elseif 'conference' == class then -- cite conference when Periodical not set OCinSoutput["rft.genre"] = "conference"; elseif in_array (class, {'book', 'citation', 'encyclopaedia', 'interview', 'map'}) then if is_set (data.Chapter) then OCinSoutput["rft.genre"] = "bookitem"; OCinSoutput["rft.atitle"] = data.Chapter; -- book chapter, encyclopedia article, interview in a book, or map title else if 'map' == class or 'interview' == class then OCinSoutput["rft.genre"] = 'unknown'; -- standalone map or interview else OCinSoutput["rft.genre"] = 'book'; -- book and encyclopedia end end else --{'audio-visual', 'AV-media-notes', 'DVD-notes', 'episode', 'interview', 'mailinglist', 'map', 'newsgroup', 'podcast', 'press release', 'serial', 'sign', 'speech', 'web'} OCinSoutput["rft.genre"] = "unknown"; end OCinSoutput["rft.btitle"] = data.Title; -- book only OCinSoutput["rft.place"] = data.PublicationPlace; -- book only OCinSoutput["rft.series"] = data.Series; -- book only OCinSoutput["rft.pages"] = data.Pages; -- book, journal OCinSoutput["rft.edition"] = data.Edition; -- book only OCinSoutput["rft.pub"] = data.PublisherName; -- book and dissertation else -- cite thesis OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:dissertation"; -- dissertation metadata identifier OCinSoutput["rft.title"] = data.Title; -- dissertation (also patent but that is not yet supported) OCinSoutput["rft.degree"] = data.Degree; -- dissertation only OCinSoutput['rft.inst'] = data.PublisherName; -- book and dissertation end -- and now common parameters (as much as possible) OCinSoutput["rft.date"] = data.Date; -- book, journal, dissertation for k, v in pairs( data.ID_list ) do -- what to do about these? For now assume that they are common to all? if k == 'ISBN' then v = clean_isbn( v ) end local id = cfg.id_handlers[k].COinS; if string.sub( id or "", 1, 4 ) == 'info' then -- for ids that are in the info:registry OCinSoutput["rft_id"] = table.concat{ id, "/", v }; elseif string.sub (id or "", 1, 3 ) == 'rft' then -- for isbn, issn, eissn, etc that have defined COinS keywords OCinSoutput[ id ] = v; elseif id then -- when cfg.id_handlers[k].COinS is not nil OCinSoutput["rft_id"] = table.concat{ cfg.id_handlers[k].prefix, v }; -- others; provide a url end end --[[ for k, v in pairs( data.ID_list ) do -- what to do about these? For now assume that they are common to all? local id, value = cfg.id_handlers[k].COinS; if k == 'ISBN' then value = clean_isbn( v ); else value = v; end if string.sub( id or "", 1, 4 ) == 'info' then OCinSoutput["rft_id"] = table.concat{ id, "/", v }; else OCinSoutput[ id ] = value; end end ]] local last, first; for k, v in ipairs( data.Authors ) do last, first = coins_cleanup (v.last), coins_cleanup (v.first or ''); -- replace any nowiki strip markers, non-printing or invisible characers if k == 1 then -- for the first author name only if is_set(last) and is_set(first) then -- set these COinS values if |first= and |last= specify the first author name OCinSoutput["rft.aulast"] = last; -- book, journal, dissertation OCinSoutput["rft.aufirst"] = first; -- book, journal, dissertation elseif is_set(last) then OCinSoutput["rft.au"] = last; -- book, journal, dissertation -- otherwise use this form for the first name end else -- for all other authors if is_set(last) and is_set(first) then OCinSoutput["rft.au"] = table.concat{ last, ", ", first }; -- book, journal, dissertation elseif is_set(last) then OCinSoutput["rft.au"] = last; -- book, journal, dissertation end end end OCinSoutput.rft_id = data.URL; OCinSoutput.rfr_id = table.concat{ "info:sid/", mw.site.server:match( "[^/]*$" ), ":", data.RawPage }; OCinSoutput = setmetatable( OCinSoutput, nil ); -- sort with version string always first, and combine. table.sort( OCinSoutput ); table.insert( OCinSoutput, 1, "ctx_ver=" .. ctx_ver ); -- such as "Z39.88-2004" return table.concat(OCinSoutput, "&"); end --[[--------------------------< G E T _ I S O 6 3 9 _ C O D E >------------------------------------------------ Validates language names provided in |language= parameter if not an ISO639-1 code. Handles the special case that is Norwegian where ISO639-1 code 'no' is mapped to language name 'Norwegian Bokmål' by Extention:CLDR. Returns the language name and associated ISO639-1 code. Because case of the source may be incorrect or different from the case that Wikimedia uses, the name comparisons are done in lower case and when a match is found, the Wikimedia version (assumed to be correct) is returned along with the code. When there is no match, we return the original language name string. mw.language.fetchLanguageNames() will return a list of languages that aren't part of ISO639-1. Names that aren't ISO639-1 but that are included in the list will be found if that name is provided in the |language= parameter. For example, if |language=Samaritan Aramaic, that name will be found with the associated code 'sam', not an ISO639-1 code. When names are found and the associated code is not two characters, this function returns only the Wikimedia language name. Adapted from code taken from Module:Check ISO 639-1. ]] local function get_iso639_code (lang) if 'norwegian' == lang:lower() then -- special case related to Wikimedia remap of code 'no' at Extension:CLDR return 'Norwegian', 'no'; -- Make sure rendered version is properly capitalized end local languages = mw.language.fetchLanguageNames(mw.getContentLanguage():getCode(), 'all') -- get a list of language names known to Wikimedia -- ('all' is required for North Ndebele, South Ndebele, and Ojibwa) local langlc = mw.ustring.lower(lang); -- lower case version for comparisons for code, name in pairs(languages) do -- scan the list to see if we can find our language if langlc == mw.ustring.lower(name) then if 2 ~= code:len() then -- ISO639-1 codes only return name; -- so return the name but not the code end return name, code; -- found it, return name to ensure proper capitalization and the ISO639-1 code end end return lang; -- not valid language; return language in original case and nil for ISO639-1 code end --[[--------------------------< L A N G U A G E _ P A R A M E T E R >------------------------------------------ Get language name from ISO639-1 code value provided. If a code is valid use the returned name; if not, then use the value that was provided with the language parameter. There is an exception. There are three ISO639-1 codes for Norewegian language variants. There are two official variants: Norwegian Bokmål (code 'nb') and Norwegian Nynorsk (code 'nn'). The third, code 'no', is defined by ISO639-1 as 'Norwegian' though in Norway this is pretty much meaningless. However, it appears that on enwiki, editors are for the most part unaware of the nb and nn variants (compare page counts for these variants at Category:Articles with non-English-language external links. Because Norwegian Bokmål is the most common language variant, Media wiki has been modified to return Norwegian Bokmål for ISO639-1 code 'no'. Here we undo that and return 'Norwegian' when editors use |language=no. We presume that editors don't know about the variants or can't descriminate between them. See Help talk:Citation Style_1#An ISO 639-1 language name test When |language= contains a valid ISO639-1 code, the page is assigned to the category for that code: Category:Norwegian-language sources (no) if the page is a mainspace page and the ISO639-1 code is not 'en'. Similarly, if the parameter is |language=Norwegian, it will be categorized in the same way. This function supports multiple languages in the form |language=nb, French, th where the language names or codes are separated from each other by commas. ]] local function language_parameter (lang) local code; -- the ISO639-1 two character code local name; -- the language name local language_list = {}; -- table of language names to be rendered local names_table = {}; -- table made from the value assigned to |language= names_table = mw.text.split (lang, '%s*,%s*'); -- names should be a comma separated list for _, lang in ipairs (names_table) do -- reuse lang if lang:match ('^%a%a%-') or 2 == lang:len() then -- ISO639-1 language code are 2 characters (fetchLanguageName also supports 3 character codes) if lang:match ('^zh-') then name = mw.language.fetchLanguageName( lang:lower(), lang:lower() ); else name = mw.language.fetchLanguageName( lang:lower(), mw.getContentLanguage():getCode() ); -- get ISO 639-1 language name if Language is a proper code end end if is_set (name) then -- if Language specified a valid ISO639-1 code code = lang:lower(); -- save it else name, code = get_iso639_code (lang); -- attempt to get code from name (assign name here so that we are sure of proper capitalization) end if is_set (code) then if 'no' == code then name = '挪威语' end; -- override wikimedia when code is 'no' if 'zh' ~= code and not code:match ('^zh-') then -- English not the language add_prop_cat ('foreign_lang_source', {name, code}) end else add_maint_cat ('unknown_lang'); -- add maint category if not already added end table.insert (language_list, name); name = ''; -- so we can reuse it end code = #language_list -- reuse code as number of languages in the list if 2 >= code then name = table.concat (language_list, '及') -- insert '及' between two language names elseif 2 < code then language_list[code] = '及' .. language_list[code]; -- prepend last name with '及' name = table.concat (language_list, '、'); -- and concatenate with '<comma><space>' separators name = name:gsub ('、及', '及', 1); end return (" " .. wrap_msg ('language', name)); -- otherwise wrap with '(in ...)' end --[[--------------------------< S E T _ C S 1 _ S T Y L E >---------------------------------------------------- Set style settings for CS1 citation templates. Returns separator and postscript settings ]] local function set_cs1_style (ps) if not is_set (ps) then -- unless explicitely set to something ps = '.'; -- terminate the rendered citation with a period end return '.', ps; -- separator is a full stop end --[[--------------------------< S E T _ C S 2 _ S T Y L E >---------------------------------------------------- Set style settings for CS2 citation templates. Returns separator, postscript, ref settings ]] local function set_cs2_style (ps, ref) if not is_set (ps) then -- if |postscript= has not been set, set cs2 default ps = ''; -- make sure it isn't nil end if not is_set (ref) then -- if |ref= is not set ref = "harv"; -- set default |ref=harv end return ',', ps, ref; -- separator is a comma end --[[--------------------------< G E T _ S E T T I N G S _ F R O M _ C I T E _ C L A S S >---------------------- When |mode= is not set or when its value is invalid, use config.CitationClass and parameter values to establish rendered style. ]] local function get_settings_from_cite_class (ps, ref, cite_class) local sep; if (cite_class == "citation") then -- for citation templates (CS2) sep, ps, ref = set_cs2_style (ps, ref); else -- not a citation template so CS1 sep, ps = set_cs1_style (ps); end return sep, ps, ref -- return them all end --[[--------------------------< S E T _ S T Y L E >------------------------------------------------------------ Establish basic style settings to be used when rendering the citation. Uses |mode= if set and valid or uses config.CitationClass from the template's #invoke: to establish style. ]] local function set_style (mode, ps, ref, cite_class) local sep; if 'cs2' == mode then -- if this template is to be rendered in CS2 (citation) style sep, ps, ref = set_cs2_style (ps, ref); elseif 'cs1' == mode then -- if this template is to be rendered in CS1 (cite xxx) style sep, ps = set_cs1_style (ps); else -- anything but cs1 or cs2 sep, ps, ref = get_settings_from_cite_class (ps, ref, cite_class); -- get settings based on the template's CitationClass end if 'none' == ps:lower() then -- if assigned value is 'none' then ps = ''; -- set to empty string end return sep, ps, ref end --[=[-------------------------< I S _ P D F >------------------------------------------------------------------ Determines if a url has the file extension that is one of the pdf file extensions used by [[MediaWiki:Common.css]] when applying the pdf icon to external links. returns true if file extension is one of the recognized extension, else false ]=] local function is_pdf (url) return url:match ('%.pdf[%?#]?') or url:match ('%.PDF[%?#]?'); end --[[--------------------------< S T Y L E _ F O R M A T >------------------------------------------------------ Applies css style to |format=, |chapter-format=, etc. Also emits an error message if the format parameter does not have a matching url parameter. If the format parameter is not set and the url contains a file extension that is recognized as a pdf document by MediaWiki's commons.css, this code will set the format parameter to (PDF) with the appropriate styling. ]] local function style_format (format, url, fmt_param, url_param) if is_set (format) then format = wrap_style ('format', format); -- add leading space, parenthases, resize if not is_set (url) then format = format .. set_error( 'format_missing_url', {fmt_param, url_param} ); -- add an error message end elseif is_pdf (url) then -- format is not set so if url is a pdf file then format = wrap_style ('format', 'PDF'); -- set format to pdf else format = ''; -- empty string for concatenation end return format; end --[[--------------------------< G E T _ D I S P L A Y _ A U T H O R S _ E D I T O R S >------------------------ Returns a number that may or may not limit the length of the author or editor name lists. When the value assigned to |display-authors= is a number greater than or equal to zero, return the number and the previous state of the 'etal' flag (false by default but may have been set to true if the name list contains some variant of the text 'et al.'). When the value assigned to |display-authors= is the keyword 'etal', return a number that is one greater than the number of authors in the list and set the 'etal' flag true. This will cause the list_people() to display all of the names in the name list followed by 'et al.' In all other cases, returns nil and the previous state of the 'etal' flag. ]] local function get_display_authors_editors (max, count, list_name, etal) if is_set (max) then if 'etal' == max:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings max = count + 1; -- number of authors + 1 so display all author name plus et al. etal = true; -- overrides value set by extract_names() elseif max:match ('^%d+$') then -- if is a string of numbers max = tonumber (max); -- make it a number if max >= count and 'authors' == list_name then -- AUTHORS ONLY -- if |display-xxxxors= value greater than or equal to number of authors/editors add_maint_cat ('disp_auth_ed', list_name); end else -- not a valid keyword or number table.insert( z.message_tail, { set_error( 'invalid_param_val', {'display-' .. list_name, max}, true ) } ); -- add error message max = nil; -- unset end elseif 'authors' == list_name then -- AUTHORS ONLY need to clear implicit et al category max = count + 1; -- number of authors + 1 end return max, etal; end --[[--------------------------< E X T R A _ T E X T _ I N _ P A G E _ C H E C K >------------------------------ Adds page to Category:CS1 maint: extra text if |page= or |pages= has what appears to be some form of p. or pp. abbreviation in the first characters of the parameter content. check Page and Pages for extraneous p, p., pp, and pp. at start of parameter value: good pattern: '^P[^%.P%l]' matches when |page(s)= begins PX or P# but not Px where x and X are letters and # is a dgiit bad pattern: '^[Pp][Pp]' matches matches when |page(s)= begins pp or pP or Pp or PP ]] local function extra_text_in_page_check (page) -- local good_pattern = '^P[^%.P%l]'; local good_pattern = '^P[^%.Pp]'; -- ok to begin with uppercase P: P7 (pg 7 of section P) but not p123 (page 123) TODO: add Gg for PG or Pg? -- local bad_pattern = '^[Pp][Pp]'; local bad_pattern = '^[Pp]?[Pp]%.?[ %d]'; if not page:match (good_pattern) and (page:match (bad_pattern) or page:match ('^[Pp]ages?')) then add_maint_cat ('extra_text'); end -- if Page:match ('^[Pp]?[Pp]%.?[ %d]') or Page:match ('^[Pp]ages?[ %d]') or -- Pages:match ('^[Pp]?[Pp]%.?[ %d]') or Pages:match ('^[Pp]ages?[ %d]') then -- add_maint_cat ('extra_text'); -- end end --[[--------------------------< P A R S E _ V A U T H O R S _ V E D I T O R S >-------------------------------- This function extracts author / editor names from |vauthors= or |veditors= and finds matching |xxxxor-maskn= and |xxxxor-linkn= in args. It then returns a table of assembled names just as extract_names() does. Author / editor names in |vauthors= or |veditors= must be in Vancouver system style. Corporate or institutional names may sometimes be required and because such names will often fail the is_good_vanc_name() and other format compliance tests, are wrapped in doubled paranethese ((corporate name)) to suppress the format tests. This function sets the vancouver error when a reqired comma is missing and when there is a space between an author's initials. ]] local function parse_vauthors_veditors (args, vparam, list_name) local names = {}; -- table of names assembled from |vauthors=, |author-maskn=, |author-linkn= local v_name_table = {}; local etal = false; -- return value set to true when we find some form of et al. vauthors parameter local last, first, link, mask; local corporate = false; vparam, etal = name_has_etal (vparam, etal, true); -- find and remove variations on et al. do not categorize (do it here because et al. might have a period) if vparam:find ('%[%[') or vparam:find ('%]%]') then -- no wikilinking vauthors names add_vanc_error (); end v_name_table = mw.text.split(vparam, "%s*,%s*") -- names are separated by commas for i, v_name in ipairs(v_name_table) do if v_name:match ('^%(%(.+%)%)$') then -- corporate authors are wrapped in doubled parenthese to supress vanc formatting and error detection first = ''; -- set to empty string for concatenation and because it may have been set for previous author/editor last = v_name:match ('^%(%((.+)%)%)$') corporate = true; elseif string.find(v_name, "%s") then lastfirstTable = {} lastfirstTable = mw.text.split(v_name, "%s") first = table.remove(lastfirstTable); -- removes and returns value of last element in table which should be author intials last = table.concat(lastfirstTable, " ") -- returns a string that is the concatenation of all other names that are not initials if mw.ustring.match (last, '%a+%s+%u+%s+%a+') or mw.ustring.match (v_name, ' %u %u$') then add_vanc_error (); -- matches last II last; the case when a comma is missing or a space between two intiials end else first = ''; -- set to empty string for concatenation and because it may have been set for previous author/editor last = v_name; -- last name or single corporate name? Doesn't support multiword corporate names? do we need this? end if is_set (first) and not mw.ustring.match (first, "^%u?%u$") then -- first shall contain one or two upper-case letters, nothing else add_vanc_error (); end -- this from extract_names () link = select_one( args, cfg.aliases[list_name .. '-Link'], 'redundant_parameters', i ); mask = select_one( args, cfg.aliases[list_name .. '-Mask'], 'redundant_parameters', i ); names[i] = {last = last, first = first, link = link, mask = mask, corporate=corporate}; -- add this assembled name to our names list end return names, etal; -- all done, return our list of names end --[[--------------------------< S E L E C T _ A U T H O R _ E D I T O R _ S O U R C E >------------------------ Select one of |authors=, |authorn= / |lastn / firstn=, or |vauthors= as the source of the author name list or select one of |editors=, |editorn= / editor-lastn= / |editor-firstn= or |veditors= as the source of the editor name list. Only one of these appropriate three will be used. The hierarchy is: |authorn= (and aliases) highest and |authors= lowest and similarly, |editorn= (and aliases) highest and |editors= lowest When looking for |authorn= / |editorn= parameters, test |xxxxor1= and |xxxxor2= (and all of their aliases); stops after the second test which mimicks the test used in extract_names() when looking for a hole in the author name list. There may be a better way to do this, I just haven't discovered what that way is. Emits an error message when more than one xxxxor name source is provided. In this function, vxxxxors = vauthors or veditors; xxxxors = authors or editors as appropriate. ]] local function select_author_editor_source (vxxxxors, xxxxors, args, list_name) local lastfirst = false; if select_one( args, cfg.aliases[list_name .. '-Last'], 'none', 1 ) or -- do this twice incase we have a first 1 without a last1 select_one( args, cfg.aliases[list_name .. '-Last'], 'none', 2 ) then lastfirst=true; end if (is_set (vxxxxors) and true == lastfirst) or -- these are the three error conditions (is_set (vxxxxors) and is_set (xxxxors)) or (true == lastfirst and is_set (xxxxors)) then local err_name; if 'AuthorList' == list_name then -- figure out which name should be used in error message err_name = 'author'; else err_name = 'editor'; end table.insert( z.message_tail, { set_error( 'redundant_parameters', {err_name .. '-name-list parameters'}, true ) } ); -- add error message end if true == lastfirst then return 1 end; -- return a number indicating which author name source to use if is_set (vxxxxors) then return 2 end; if is_set (xxxxors) then return 3 end; return 1; -- no authors so return 1; this allows missing author name test to run in case there is a first without last end --[[--------------------------< I S _ V A L I D _ P A R A M E T E R _ V A L U E >------------------------------ This function is used to validate a parameter's assigned value for those parameters that have only a limited number of allowable values (yes, y, true, no, etc). When the parameter value has not been assigned a value (missing or empty in the source template) the function refurns true. If the parameter value is one of the list of allowed values returns true; else, emits an error message and returns false. ]] local function is_valid_parameter_value (value, name, possible) if not is_set (value) then return true; -- an empty parameter is ok elseif in_array(value:lower(), possible) then return true; else table.insert( z.message_tail, { set_error( 'invalid_param_val', {name, value}, true ) } ); -- not an allowed value so add error message return false end end --[[--------------------------< T E R M I N A T E _ N A M E _ L I S T >---------------------------------------- This function terminates a name list (author, contributor, editor) with a separator character (sepc) and a space when the last character is not a sepc character or when the last three characters are not sepc followed by two closing square brackets (close of a wikilink). When either of these is true, the name_list is terminated with a single space character. ]] local function terminate_name_list (name_list, sepc) if (string.sub (name_list,-1,-1) == sepc) or (string.sub (name_list,-3,-1) == sepc .. ']]') then -- if last name in list ends with sepc char return name_list .. " "; -- don't add another else return name_list .. sepc .. ' '; -- otherwise terninate the name list end end --[[-------------------------< F O R M A T _ V O L U M E _ I S S U E >---------------------------------------- returns the concatenation of the formatted volume and issue parameters as a single string; or formatted volume or formatted issue, or an empty string if neither are set. ]] local function format_volume_issue (volume, issue, cite_class, origin, sepc, lower) if not is_set (volume) and not is_set (issue) then return ''; end if 'magazine' == cite_class or (in_array (cite_class, {'citation', 'map'}) and 'magazine' == origin) then if is_set (volume) and is_set (issue) then return wrap_msg ('vol-no', {sepc, volume, issue}, lower); elseif is_set (volume) then return wrap_msg ('vol', {sepc, volume}, lower); else return wrap_msg ('issue', {sepc, issue}, lower); end end local vol = ''; if is_set (volume) then if (6 < mw.ustring.len(volume)) then vol = substitute (cfg.messages['j-vol'], {sepc, volume}); else vol = wrap_style ('vol-bold', hyphen_to_dash(volume)); end end if is_set (issue) then return vol .. substitute (cfg.messages['j-issue'], issue); end return vol; end --[[-------------------------< F O R M A T _ P A G E S _ S H E E T S >----------------------------------------- adds static text to one of |page(s)= or |sheet(s)= values and returns it with all of the others set to empty strings. The return order is: page, pages, sheet, sheets Singular has priority over plural when both are provided. ]] local function format_pages_sheets (page, pages, sheet, sheets, cite_class, origin, sepc, nopp, lower) if 'map' == cite_class then -- only cite map supports sheet(s) as in-source locators if is_set (sheet) then if 'journal' == origin then return '', '', wrap_msg ('j-sheet', sheet, lower), ''; else return '', '', wrap_msg ('sheet', {sepc, sheet}, lower), ''; end elseif is_set (sheets) then if 'journal' == origin then return '', '', '', wrap_msg ('j-sheets', sheets, lower); else return '', '', '', wrap_msg ('sheets', {sepc, sheets}, lower); end end end local is_journal = 'journal' == cite_class or (in_array (cite_class, {'citation', 'map'}) and 'journal' == origin); if is_set (page) then if is_journal then return substitute (cfg.messages['j-page(s)'], page), '', '', ''; elseif not nopp then return substitute (cfg.messages['p-prefix'], {sepc, page}), '', '', ''; else return substitute (cfg.messages['nopp'], {sepc, page}), '', '', ''; end elseif is_set(pages) then if is_journal then return substitute (cfg.messages['j-page(s)'], pages), '', '', ''; elseif tonumber(pages) ~= nil and not nopp then -- if pages is only digits, assume a single page number return '', substitute (cfg.messages['p-prefix'], {sepc, pages}), '', ''; elseif not nopp then return '', substitute (cfg.messages['pp-prefix'], {sepc, pages}), '', ''; else return '', substitute (cfg.messages['nopp'], {sepc, pages}), '', ''; end end return '', '', '', ''; -- return empty strings end --[[--------------------------< C I T A T I O N 0 >------------------------------------------------------------ This is the main function doing the majority of the citation formatting. ]] local function citation0( config, args) --[[ Load Input Parameters The argument_wrapper facilitates the mapping of multiple aliases to single internal variable. ]] local A = argument_wrapper( args ); local i -- Pick out the relevant fields from the arguments. Different citation templates -- define different field names for the same underlying things. local author_etal; local a = {}; -- authors list from |lastn= / |firstn= pairs or |vauthors= local Authors; local NameListFormat = A['NameListFormat']; do -- to limit scope of selected local selected = select_author_editor_source (A['Vauthors'], A['Authors'], args, 'AuthorList'); if 1 == selected then a, author_etal = extract_names (args, 'AuthorList'); -- fetch author list from |authorn= / |lastn= / |firstn=, |author-linkn=, and |author-maskn= elseif 2 == selected then NameListFormat = 'vanc'; -- override whatever |name-list-format= might be a, author_etal = parse_vauthors_veditors (args, args.vauthors, 'AuthorList'); -- fetch author list from |vauthors=, |author-linkn=, and |author-maskn= elseif 3 == selected then Authors = A['Authors']; -- use content of |authors= end end local Coauthors = A['Coauthors']; local Others = A['Others']; local editor_etal; local e = {}; -- editors list from |editor-lastn= / |editor-firstn= pairs or |veditors= local Editors; do -- to limit scope of selected local selected = select_author_editor_source (A['Veditors'], A['Editors'], args, 'EditorList'); if 1 == selected then e, editor_etal = extract_names (args, 'EditorList'); -- fetch editor list from |editorn= / |editor-lastn= / |editor-firstn=, |editor-linkn=, and |editor-maskn= elseif 2 == selected then NameListFormat = 'vanc'; -- override whatever |name-list-format= might be e, editor_etal = parse_vauthors_veditors (args, args.veditors, 'EditorList'); -- fetch editor list from |veditors=, |editor-linkn=, and |editor-maskn= elseif 3 == selected then Editors = A['Editors']; -- use content of |editors= end end local t = {}; -- translators list from |translator-lastn= / translator-firstn= pairs local Translators; -- assembled translators name list t = extract_names (args, 'TranslatorList'); -- fetch translator list from |translatorn= / |translator-lastn=, -firstn=, -linkn=, -maskn= local c = {}; -- contributors list from |contributor-lastn= / contributor-firstn= pairs local Contributors; -- assembled contributors name list local Contribution = A['Contribution']; if in_array(config.CitationClass, {"book","citation"}) and not is_set(A['Periodical']) then -- |contributor= and |contribution= only supported in book cites c = extract_names (args, 'ContributorList'); -- fetch contributor list from |contributorn= / |contributor-lastn=, -firstn=, -linkn=, -maskn= if 0 < #c then if not is_set (Contribution) then -- |contributor= requires |contribution= table.insert( z.message_tail, { set_error( 'contributor_missing_required_param', 'contribution')}); -- add missing contribution error message c = {}; -- blank the contributors' table; it is used as a flag later end if 0 == #a then -- |contributor= requires |author= table.insert( z.message_tail, { set_error( 'contributor_missing_required_param', 'author')}); -- add missing author error message c = {}; -- blank the contributors' table; it is used as a flag later end end else -- if not a book cite if select_one (args, cfg.aliases['ContributorList-Last'], 'redundant_parameters', 1 ) then -- are there contributor name list parameters? table.insert( z.message_tail, { set_error( 'contributor_ignored')}); -- add contributor ignored error message end Contribution = nil; -- unset end if not is_valid_parameter_value (NameListFormat, 'name-list-format', cfg.keywords['name-list-format']) then -- only accepted value for this parameter is 'vanc' NameListFormat = ''; -- anything else, set to empty string end local Year = A['Year']; local PublicationDate = A['PublicationDate']; local OrigYear = A['OrigYear']; local Date = A['Date']; local LayDate = A['LayDate']; ------------------------------------------------- Get title data local Title = A['Title']; local ScriptTitle = A['ScriptTitle']; local BookTitle = A['BookTitle']; local Conference = A['Conference']; local TransTitle = A['TransTitle']; local TitleNote = A['TitleNote']; local TitleLink = A['TitleLink']; if is_set (TitleLink) and false == link_param_ok (TitleLink) then table.insert( z.message_tail, { set_error( 'bad_paramlink', A:ORIGIN('TitleLink'))}); -- url or wikilink in |title-link=; end local Chapter = A['Chapter']; local ScriptChapter = A['ScriptChapter']; local ChapterLink -- = A['ChapterLink']; -- deprecated as a parameter but still used internally by cite episode local TransChapter = A['TransChapter']; local TitleType = A['TitleType']; local Degree = A['Degree']; local Docket = A['Docket']; local ArchiveFormat = A['ArchiveFormat']; local ArchiveURL = A['ArchiveURL']; local URL = A['URL'] local URLorigin = A:ORIGIN('URL'); -- get name of parameter that holds URL local ChapterURL = A['ChapterURL']; local ChapterURLorigin = A:ORIGIN('ChapterURL'); -- get name of parameter that holds ChapterURL local ConferenceFormat = A['ConferenceFormat']; local ConferenceURL = A['ConferenceURL']; local ConferenceURLorigin = A:ORIGIN('ConferenceURL'); -- get name of parameter that holds ConferenceURL local Periodical = A['Periodical']; local Periodical_origin = A:ORIGIN('Periodical'); -- get the name of the periodical parameter local Series = A['Series']; local Volume; local Issue; local Page; local Pages; local At; if in_array (config.CitationClass, cfg.templates_using_volume) and not ('conference' == config.CitationClass and not is_set (Periodical)) then Volume = A['Volume']; end if in_array (config.CitationClass, cfg.templates_using_issue) and not (in_array (config.CitationClass, {'conference', 'map'}) and not is_set (Periodical))then Issue = A['Issue']; end local Position = ''; if not in_array (config.CitationClass, cfg.templates_not_using_page) then Page = A['Page']; Pages = hyphen_to_dash( A['Pages'] ); At = A['At']; end local Edition = A['Edition']; local PublicationPlace = A['PublicationPlace'] local Place = A['Place']; local PublisherName = A['PublisherName']; local RegistrationRequired = A['RegistrationRequired']; if not is_valid_parameter_value (RegistrationRequired, 'registration', cfg.keywords ['yes_true_y']) then RegistrationRequired=nil; end local SubscriptionRequired = A['SubscriptionRequired']; if not is_valid_parameter_value (SubscriptionRequired, 'subscription', cfg.keywords ['yes_true_y']) then SubscriptionRequired=nil; end local Via = A['Via']; local AccessDate = A['AccessDate']; local ArchiveDate = A['ArchiveDate']; local Agency = A['Agency']; local DeadURL = A['DeadURL'] if not is_valid_parameter_value (DeadURL, 'dead-url', cfg.keywords ['deadurl']) then -- set in config.defaults to 'yes' DeadURL = ''; -- anything else, set to empty string end local Language = A['Language']; local Format = A['Format']; local ChapterFormat = A['ChapterFormat']; local DoiBroken = A['DoiBroken']; local ID = A['ID']; local ASINTLD = A['ASINTLD']; local IgnoreISBN = A['IgnoreISBN']; if not is_valid_parameter_value (IgnoreISBN, 'ignore-isbn-error', cfg.keywords ['yes_true_y']) then IgnoreISBN = nil; -- anything else, set to empty string end local Embargo = A['Embargo']; local Class = A['Class']; -- arxiv class identifier local ID_list = extract_ids( args ); local ID_access_levels = extract_id_access_levels( args, ID_list ); local Quote = A['Quote']; local LayFormat = A['LayFormat']; local LayURL = A['LayURL']; local LaySource = A['LaySource']; local Transcript = A['Transcript']; local TranscriptFormat = A['TranscriptFormat']; local TranscriptURL = A['TranscriptURL'] local TranscriptURLorigin = A:ORIGIN('TranscriptURL'); -- get name of parameter that holds TranscriptURL local LastAuthorAmp = A['LastAuthorAmp']; if not is_valid_parameter_value (LastAuthorAmp, 'last-author-amp', cfg.keywords ['yes_true_y']) then LastAuthorAmp = nil; -- set to empty string end local no_tracking_cats = A['NoTracking']; if not is_valid_parameter_value (no_tracking_cats, 'no-tracking', cfg.keywords ['yes_true_y']) then no_tracking_cats = nil; -- set to empty string end --these are used by cite interview local Callsign = A['Callsign']; local City = A['City']; local Program = A['Program']; --local variables that are not cs1 parameters local use_lowercase; -- controls capitalization of certain static text local this_page = mw.title.getCurrentTitle(); -- also used for COinS and for language local anchor_year; -- used in the CITEREF identifier local COinS_date = {}; -- holds date info extracted from |date= for the COinS metadata by Module:Date verification -- set default parameter values defined by |mode= parameter. If |mode= is empty or omitted, use CitationClass to set these values local Mode = A['Mode']; if not is_valid_parameter_value (Mode, 'mode', cfg.keywords['mode']) then Mode = ''; end local sepc; -- separator between citation elements for CS1 a period, for CS2, a comma local PostScript; local Ref; sepc, PostScript, Ref = set_style (Mode:lower(), A['PostScript'], A['Ref'], config.CitationClass); use_lowercase = ( sepc == ',' ); -- used to control capitalization for certain static text --check this page to see if it is in one of the namespaces that cs1 is not supposed to add to the error categories if not is_set (no_tracking_cats) then -- ignore if we are already not going to categorize this page if in_array (this_page.nsText, cfg.uncategorized_namespaces) then no_tracking_cats = "true"; -- set no_tracking_cats end for _,v in ipairs (cfg.uncategorized_subpages) do -- cycle through page name patterns if this_page.text:match (v) then -- test page name against each pattern no_tracking_cats = "true"; -- set no_tracking_cats break; -- bail out if one is found end end end -- check for extra |page=, |pages= or |at= parameters. (also sheet and sheets while we're at it) select_one( args, {'page', 'p', 'pp', 'pages', 'at', 'sheet', 'sheets'}, 'redundant_parameters' ); -- this is a dummy call simply to get the error message and category local NoPP = A['NoPP'] if is_set (NoPP) and is_valid_parameter_value (NoPP, 'nopp', cfg.keywords ['yes_true_y']) then NoPP = true; else NoPP = nil; -- unset, used as a flag later end if is_set(Page) then if is_set(Pages) or is_set(At) then Pages = ''; -- unset the others At = ''; end extra_text_in_page_check (Page); -- add this page to maint cat if |page= value begins with what looks like p. or pp. elseif is_set(Pages) then if is_set(At) then At = ''; -- unset end extra_text_in_page_check (Pages); -- add this page to maint cat if |pages= value begins with what looks like p. or pp. end -- both |publication-place= and |place= (|location=) allowed if different if not is_set(PublicationPlace) and is_set(Place) then PublicationPlace = Place; -- promote |place= (|location=) to |publication-place end if PublicationPlace == Place then Place = ''; end -- don't need both if they are the same --[[ Parameter remapping for cite encyclopedia: When the citation has these parameters: |encyclopedia and |title then map |title to |article and |encyclopedia to |title |encyclopedia and |article then map |encyclopedia to |title |encyclopedia then map |encyclopedia to |title |trans_title maps to |trans_chapter when |title is re-mapped |url maps to |chapterurl when |title is remapped All other combinations of |encyclopedia, |title, and |article are not modified ]] local Encyclopedia = A['Encyclopedia']; if ( config.CitationClass == "encyclopaedia" ) or ( config.CitationClass == "citation" and is_set (Encyclopedia)) then -- test code for citation if is_set(Periodical) then -- Periodical is set when |encyclopedia is set if is_set(Title) or is_set (ScriptTitle) then if not is_set(Chapter) then Chapter = Title; -- |encyclopedia and |title are set so map |title to |article and |encyclopedia to |title ScriptChapter = ScriptTitle; TransChapter = TransTitle; ChapterURL = URL; if not is_set (ChapterURL) and is_set (TitleLink) then Chapter= '[[' .. TitleLink .. '|' .. Chapter .. ']]'; end Title = Periodical; ChapterFormat = Format; Periodical = ''; -- redundant so unset TransTitle = ''; URL = ''; Format = ''; TitleLink = ''; ScriptTitle = ''; end else -- |title not set Title = Periodical; -- |encyclopedia set and |article set or not set so map |encyclopedia to |title Periodical = ''; -- redundant so unset end end end -- Special case for cite techreport. if (config.CitationClass == "techreport") then -- special case for cite techreport if is_set(A['Number']) then -- cite techreport uses 'number', which other citations alias to 'issue' if not is_set(ID) then -- can we use ID for the "number"? ID = A['Number']; -- yes, use it else -- ID has a value so emit error message table.insert( z.message_tail, { set_error('redundant_parameters', {wrap_style ('parameter', 'id') .. ' and ' .. wrap_style ('parameter', 'number')}, true )}); end end end -- special case for cite interview if (config.CitationClass == "interview") then if is_set(Program) then ID = ' ' .. Program; end if is_set(Callsign) then if is_set(ID) then ID = ID .. sepc .. ' ' .. Callsign; else ID = ' ' .. Callsign; end end if is_set(City) then if is_set(ID) then ID = ID .. sepc .. ' ' .. City; else ID = ' ' .. City; end end if is_set(Others) then if is_set(TitleType) then Others = ' ' .. TitleType .. ' with ' .. Others; TitleType = ''; else Others = ' ' .. 'Interview with ' .. Others; end else Others = '(Interview)'; end end -- special case for cite mailing list if (config.CitationClass == "mailinglist") then Periodical = A ['MailingList']; elseif 'mailinglist' == A:ORIGIN('Periodical') then Periodical = ''; -- unset because mailing list is only used for cite mailing list end -- Account for the oddity that is {{cite conference}}, before generation of COinS data. if 'conference' == config.CitationClass then if is_set(BookTitle) then Chapter = Title; -- ChapterLink = TitleLink; -- |chapterlink= is deprecated ChapterURL = URL; ChapterURLorigin = URLorigin; URLorigin = ''; ChapterFormat = Format; TransChapter = TransTitle; Title = BookTitle; Format = ''; -- TitleLink = ''; TransTitle = ''; URL = ''; end elseif 'speech' ~= config.CitationClass then Conference = ''; -- not cite conference or cite speech so make sure this is empty string end -- cite map oddities local Cartography = ""; local Scale = ""; local Sheet = A['Sheet'] or ''; local Sheets = A['Sheets'] or ''; if config.CitationClass == "map" then Chapter = A['Map']; ChapterURL = A['MapURL']; TransChapter = A['TransMap']; ChapterURLorigin = A:ORIGIN('MapURL'); ChapterFormat = A['MapFormat']; Cartography = A['Cartography']; if is_set( Cartography ) then Cartography = sepc .. " " .. wrap_msg ('cartography', Cartography, use_lowercase); end Scale = A['Scale']; if is_set( Scale ) then Scale = sepc .. " " .. Scale; end end -- Account for the oddities that are {{cite episode}} and {{cite serial}}, before generation of COinS data. if 'episode' == config.CitationClass or 'serial' == config.CitationClass then local AirDate = A['AirDate']; local SeriesLink = A['SeriesLink']; if is_set (SeriesLink) and false == link_param_ok (SeriesLink) then table.insert( z.message_tail, { set_error( 'bad_paramlink', A:ORIGIN('SeriesLink'))}); end local Network = A['Network']; local Station = A['Station']; local s, n = {}, {}; -- do common parameters first if is_set(Network) then table.insert(n, Network); end if is_set(Station) then table.insert(n, Station); end ID = table.concat(n, sepc .. ' '); if not is_set (Date) and is_set (AirDate) then -- promote airdate to date Date = AirDate; end if 'episode' == config.CitationClass then -- handle the oddities that are strictly {{cite episode}} local Season = A['Season']; local SeriesNumber = A['SeriesNumber']; if is_set (Season) and is_set (SeriesNumber) then -- these are mutually exclusive so if both are set table.insert( z.message_tail, { set_error( 'redundant_parameters', {wrap_style ('parameter', 'season') .. ' and ' .. wrap_style ('parameter', 'seriesno')}, true ) } ); -- add error message SeriesNumber = ''; -- unset; prefer |season= over |seriesno= end -- assemble a table of parts concatenated later into Series if is_set(Season) then table.insert(s, wrap_msg ('season', Season, use_lowercase)); end if is_set(SeriesNumber) then table.insert(s, wrap_msg ('series', SeriesNumber, use_lowercase)); end if is_set(Issue) then table.insert(s, wrap_msg ('episode', Issue, use_lowercase)); end Issue = ''; -- unset because this is not a unique parameter Chapter = Title; -- promote title parameters to chapter ScriptChapter = ScriptTitle; ChapterLink = TitleLink; -- alias episodelink TransChapter = TransTitle; ChapterURL = URL; ChapterURLorigin = A:ORIGIN('URL'); Title = Series; -- promote series to title TitleLink = SeriesLink; Series = table.concat(s, sepc .. ' '); -- this is concatenation of season, seriesno, episode number if is_set (ChapterLink) and not is_set (ChapterURL) then -- link but not URL Chapter = '[[' .. ChapterLink .. '|' .. Chapter .. ']]'; -- ok to wikilink elseif is_set (ChapterLink) and is_set (ChapterURL) then -- if both are set, URL links episode; Series = '[[' .. ChapterLink .. '|' .. Series .. ']]'; -- series links with ChapterLink (episodelink -> TitleLink -> ChapterLink) ugly end URL = ''; -- unset TransTitle = ''; ScriptTitle = ''; else -- now oddities that are cite serial Issue = ''; -- unset because this parameter no longer supported by the citation/core version of cite serial Chapter = A['Episode']; -- TODO: make |episode= available to cite episode someday? if is_set (Series) and is_set (SeriesLink) then Series = '[[' .. SeriesLink .. '|' .. Series .. ']]'; end Series = wrap_style ('italic-title', Series); -- series is italicized end end -- end of {{cite episode}} stuff -- Account for the oddities that are {{cite arxiv}}, before generation of COinS data. if 'arxiv' == config.CitationClass then if not is_set (ID_list['ARXIV']) then -- |arxiv= or |eprint= required for cite arxiv table.insert( z.message_tail, { set_error( 'arxiv_missing', {}, true ) } ); -- add error message elseif is_set (Series) then -- series is an alias of version ID_list['ARXIV'] = ID_list['ARXIV'] .. Series; -- concatenate version onto the end of the arxiv identifier Series = ''; -- unset deprecated_parameter ('version'); -- deprecated parameter but only for cite arxiv end if first_set ({AccessDate, At, Chapter, Format, Page, Pages, Periodical, PublisherName, URL, -- a crude list of parameters that are not supported by cite arxiv ID_list['ASIN'], ID_list['BIBCODE'], ID_list['DOI'], ID_list['ISBN'], ID_list['ISSN'], ID_list['JFM'], ID_list['JSTOR'], ID_list['LCCN'], ID_list['MR'], ID_list['OCLC'], ID_list['OL'], ID_list['OSTI'], ID_list['PMC'], ID_list['PMID'], ID_list['RFC'], ID_list['SSRN'], ID_list['USENETID'], ID_list['ZBL']},27) then table.insert( z.message_tail, { set_error( 'arxiv_params_not_supported', {}, true ) } ); -- add error message AccessDate= ''; -- set these to empty string; not supported in cite arXiv PublisherName = ''; -- (if the article has been published, use cite journal, or other) Chapter = ''; URL = ''; Format = ''; Page = ''; Pages = ''; At = ''; end Periodical = 'arXiv'; -- set to arXiv for COinS; after that, must be set to empty string end -- handle type parameter for those CS1 citations that have default values if in_array(config.CitationClass, {"AV-media-notes", "DVD-notes", "mailinglist", "map", "podcast", "pressrelease", "report", "techreport", "thesis"}) then TitleType = set_titletype (config.CitationClass, TitleType); if is_set(Degree) and "Thesis" == TitleType then -- special case for cite thesis TitleType = Degree .. "论文"; end end if is_set(TitleType) then -- if type parameter is specified TitleType = substitute( cfg.messages['type'], TitleType); -- display it in parentheses end -- legacy: promote concatenation of |month=, and |year= to Date if Date not set; or, promote PublicationDate to Date if neither Date nor Year are set. if not is_set (Date) then Date = Year; -- promote Year to Date Year = nil; -- make nil so Year as empty string isn't used for CITEREF if not is_set (Date) and is_set(PublicationDate) then -- use PublicationDate when |date= and |year= are not set Date = PublicationDate; -- promote PublicationDate to Date PublicationDate = ''; -- unset, no longer needed end end if PublicationDate == Date then PublicationDate = ''; end -- if PublicationDate is same as Date, don't display in rendered citation --[[ Go test all of the date-holding parameters for valid MOS:DATE format and make sure that dates are real dates. This must be done before we do COinS because here is where we get the date used in the metadata. Date validation supporting code is in Module:Citation/CS1/Date_validation ]] do -- create defined block to contain local variables error_message and mismatch local error_message = ''; -- AirDate has been promoted to Date so not necessary to check it anchor_year, error_message = dates({['access-date']=AccessDate, ['archive-date']=ArchiveDate, ['date']=Date, ['doi-broken-date']=DoiBroken, ['embargo']=Embargo, ['lay-date']=LayDate, ['publication-date']=PublicationDate, ['year']=Year}, COinS_date); if is_set (Year) and is_set (Date) then -- both |date= and |year= not normally needed; local mismatch = year_date_check (Year, Date) if 0 == mismatch then -- |year= does not match a year-value in |date= if is_set (error_message) then -- if there is already an error message error_message = error_message .. ', '; -- tack on this additional message end error_message = error_message .. '&#124;year= / &#124;date= mismatch'; elseif 1 == mismatch then -- |year= matches year-value in |date= add_maint_cat ('date_year'); end end if is_set(error_message) then table.insert( z.message_tail, { set_error( 'bad_date', {error_message}, true ) } ); -- add this error message end end -- end of do -- Account for the oddity that is {{cite journal}} with |pmc= set and |url= not set. Do this after date check but before COInS. -- Here we unset Embargo if PMC not embargoed (|embargo= not set in the citation) or if the embargo time has expired. Otherwise, holds embargo date Embargo = is_embargoed (Embargo); -- if config.CitationClass == "journal" and not is_set(URL) and is_set(ID_list['PMC']) then if not is_set (Embargo) then -- if not embargoed or embargo has expired URL=cfg.id_handlers['PMC'].prefix .. ID_list['PMC']; -- set url to be the same as the PMC external link if not embargoed URLorigin = cfg.id_handlers['PMC'].parameters[1]; -- set URLorigin to parameter name for use in error message if citation is missing a |title= end end -- At this point fields may be nil if they weren't specified in the template use. We can use that fact. -- Test if citation has no title if not is_set(Title) and not is_set(TransTitle) and not is_set(ScriptTitle) then if 'episode' == config.CitationClass then -- special case for cite episode; TODO: is there a better way to do this? table.insert( z.message_tail, { set_error( 'citation_missing_title', {'series'}, true ) } ); else table.insert( z.message_tail, { set_error( 'citation_missing_title', {'title'}, true ) } ); end end if 'none' == Title and in_array (config.CitationClass, {'journal', 'citation'}) and is_set (Periodical) and 'journal' == A:ORIGIN('Periodical') then -- special case for journal cites Title = ''; -- set title to empty string add_maint_cat ('untitled'); end check_for_url ({ -- add error message when any of these parameters contains a URL ['title']=Title, [A:ORIGIN('Chapter')]=Chapter, [A:ORIGIN('Periodical')]=Periodical, [A:ORIGIN('PublisherName')] = PublisherName, }); -- COinS metadata (see <http://ocoins.info/>) for automated parsing of citation information. -- handle the oddity that is cite encyclopedia and {{citation |encyclopedia=something}}. Here we presume that -- when Periodical, Title, and Chapter are all set, then Periodical is the book (encyclopedia) title, Title -- is the article title, and Chapter is a section within the article. So, we remap local coins_chapter = Chapter; -- default assuming that remapping not required local coins_title = Title; -- et tu if 'encyclopaedia' == config.CitationClass or ('citation' == config.CitationClass and is_set (Encyclopedia)) then if is_set (Chapter) and is_set (Title) and is_set (Periodical) then -- if all are used then coins_chapter = Title; -- remap coins_title = Periodical; end end local coins_author = a; -- default for coins rft.au if 0 < #c then -- but if contributor list coins_author = c; -- use that instead end -- this is the function call to COinS() local OCinSoutput = COinS({ ['Periodical'] = Periodical, ['Encyclopedia'] = Encyclopedia, ['Chapter'] = make_coins_title (coins_chapter, ScriptChapter), -- Chapter and ScriptChapter stripped of bold / italic wikimarkup ['Map'] = Map, ['Degree'] = Degree; -- cite thesis only ['Title'] = make_coins_title (coins_title, ScriptTitle), -- Title and ScriptTitle stripped of bold / italic wikimarkup ['PublicationPlace'] = PublicationPlace, ['Date'] = COinS_date.rftdate, -- COinS_date has correctly formatted date if Date is valid; ['Season'] = COinS_date.rftssn, ['Chron'] = COinS_date.rftchron or (not COinS_date.rftdate and Date) or '', -- chron but if not set and invalid date format use Date; keep this last bit? ['Series'] = Series, ['Volume'] = Volume, ['Issue'] = Issue, ['Pages'] = get_coins_pages (first_set ({Sheet, Sheets, Page, Pages, At}, 5)), -- pages stripped of external links ['Edition'] = Edition, ['PublisherName'] = PublisherName, ['URL'] = first_set ({ChapterURL, URL}, 2), ['Authors'] = coins_author, ['ID_list'] = ID_list, ['RawPage'] = this_page.prefixedText, }, config.CitationClass); -- Account for the oddities that are {{cite arxiv}}, AFTER generation of COinS data. if 'arxiv' == config.CitationClass then -- we have set rft.jtitle in COinS to arXiv, now unset so it isn't displayed Periodical = ''; -- periodical not allowed in cite arxiv; if article has been published, use cite journal end -- special case for cite newsgroup. Do this after COinS because we are modifying Publishername to include some static text if 'newsgroup' == config.CitationClass then if is_set (PublisherName) then PublisherName = substitute (cfg.messages['newsgroup'], external_link( 'news:' .. PublisherName, PublisherName, A:ORIGIN('PublisherName') )); end end -- Now perform various field substitutions. -- We also add leading spaces and surrounding markup and punctuation to the -- various parts of the citation, but only when they are non-nil. local EditorCount; -- used only for choosing {ed.) or (eds.) annotation at end of editor name-list do local last_first_list; local maximum; local control = { format = NameListFormat, -- empty string or 'vanc' maximum = nil, -- as if display-authors or display-editors not set lastauthoramp = LastAuthorAmp, page_name = this_page.text -- get current page name so that we don't wikilink to it via editorlinkn }; do -- do editor name list first because coauthors can modify control table maximum , editor_etal = get_display_authors_editors (A['DisplayEditors'], #e, 'editors', editor_etal); --[[ Preserve old-style implicit et al. 临时修复"Category:含有旧式缩略标签的引用的页面 in editors"的问题,中文版目前与英文版逻辑不一样,暂时不需要这个分类。等以后更新时再看怎么处理 --2017.6.23 shizhao if not is_set(maximum) and #e == 4 then maximum = 3; table.insert( z.message_tail, { set_error('implict_etal_editor', {}, true) } ); end ]] control.maximum = maximum; last_first_list, EditorCount = list_people(control, e, editor_etal, 'editor'); if is_set (Editors) then if editor_etal then Editors = Editors .. ' ' .. cfg.messages['et al']; -- add et al. to editors parameter beause |display-editors=etal EditorCount = 2; -- with et al., |editors= is multiple names; spoof to display (eds.) annotation else EditorCount = 2; -- we don't know but assume |editors= is multiple names; spoof to display (eds.) annotation end else Editors = last_first_list; -- either an author name list or an empty string end if 1 == EditorCount and (true == editor_etal or 1 < #e) then -- only one editor displayed but includes etal then EditorCount = 2; -- spoof to display (eds.) annotation end end do -- now do translators control.maximum = #t; -- number of translators Translators = list_people(control, t, false, 'translator'); -- et al not currently supported end do -- now do contributors control.maximum = #c; -- number of contributors Contributors = list_people(control, c, false, 'contributor'); -- et al not currently supported end do -- now do authors control.maximum , author_etal = get_display_authors_editors (A['DisplayAuthors'], #a, 'authors', author_etal); if is_set(Coauthors) then -- if the coauthor field is also used, prevent ampersand and et al. formatting. control.lastauthoramp = nil; control.maximum = #a + 1; end last_first_list = list_people(control, a, author_etal, 'author'); if is_set (Authors) then Authors, author_etal = name_has_etal (Authors, author_etal, false); -- find and remove variations on et al. if author_etal then Authors = Authors .. ' ' .. cfg.messages['et al']; -- add et al. to authors parameter end else Authors = last_first_list; -- either an author name list or an empty string end end -- end of do if not is_set(Authors) and is_set(Coauthors) then -- coauthors aren't displayed if one of authors=, authorn=, or lastn= isn't specified table.insert( z.message_tail, { set_error('coauthors_missing_author', {}, true) } ); -- emit error message end end -- apply |[xx-]format= styling; at the end, these parameters hold correctly styled format annotation, -- an error message if the associated url is not set, or an empty string for concatenation ArchiveFormat = style_format (ArchiveFormat, ArchiveURL, 'archive-format', 'archive-url'); ConferenceFormat = style_format (ConferenceFormat, ConferenceURL, 'conference-format', 'conference-url'); Format = style_format (Format, URL, 'format', 'url'); LayFormat = style_format (LayFormat, LayURL, 'lay-format', 'lay-url'); TranscriptFormat = style_format (TranscriptFormat, TranscriptURL, 'transcript-format', 'transcripturl'); -- special case for chapter format so no error message or cat when chapter not supported if not (in_array(config.CitationClass, {'web','news','journal', 'magazine', 'pressrelease','podcast', 'newsgroup', 'arxiv'}) or ('citation' == config.CitationClass and is_set (Periodical) and not is_set (Encyclopedia))) then ChapterFormat = style_format (ChapterFormat, ChapterURL, 'chapter-format', 'chapter-url'); end if not is_set(URL) then --and if in_array(config.CitationClass, {"web","podcast", "mailinglist"}) then -- Test if cite web or cite podcast |url= is missing or empty table.insert( z.message_tail, { set_error( 'cite_web_url', {}, true ) } ); end -- Test if accessdate is given without giving a URL if is_set(AccessDate) and not is_set(ChapterURL)then -- ChapterURL may be set when the others are not set; TODO: move this to a separate test? table.insert( z.message_tail, { set_error( 'accessdate_missing_url', {}, true ) } ); AccessDate = ''; end end local OriginalURL, OriginalURLorigin, OriginalFormat; -- TODO: swap chapter and title here so that archive applies to most specific if both are set? DeadURL = DeadURL:lower(); -- used later when assembling archived text if is_set( ArchiveURL ) then if is_set (URL) then OriginalURL = URL; -- save copy of original source URL OriginalURLorigin = URLorigin; -- name of url parameter for error messages OriginalFormat = Format; -- and original |format= if not in_array (DeadURL, {'no', 'live'}) then -- if URL set then archive-url applies to it URL = ArchiveURL -- swap-in the archive's url URLorigin = A:ORIGIN('ArchiveURL') -- name of archive url parameter for error messages Format = ArchiveFormat or ''; -- swap in archive's format end elseif is_set (ChapterURL) then -- URL not set so if chapter-url is set apply archive url to it OriginalURL = ChapterURL; -- save copy of source chapter's url for archive text OriginalURLorigin = ChapterURLorigin; -- name of chapter-url parameter for error messages OriginalFormat = ChapterFormat; -- and original |format= if not in_array (DeadURL, {'no', 'live'}) then ChapterURL = ArchiveURL -- swap-in the archive's url ChapterURLorigin = A:ORIGIN('ArchiveURL') -- name of archive-url parameter for error messages ChapterFormat = ArchiveFormat or ''; -- swap in archive's format end end end if in_array(config.CitationClass, {'web','news','journal', 'magazine', 'pressrelease','podcast', 'newsgroup', 'arxiv'}) or -- if any of the 'periodical' cites except encyclopedia ('citation' == config.CitationClass and is_set (Periodical) and not is_set (Encyclopedia)) then local chap_param; if is_set (Chapter) then -- get a parameter name from one of these chapter related meta-parameters chap_param = A:ORIGIN ('Chapter') elseif is_set (TransChapter) then chap_param = A:ORIGIN ('TransChapter') elseif is_set (ChapterURL) then chap_param = A:ORIGIN ('ChapterURL') elseif is_set (ScriptChapter) then chap_param = A:ORIGIN ('ScriptChapter') else is_set (ChapterFormat) chap_param = A:ORIGIN ('ChapterFormat') end if is_set (chap_param) then -- if we found one table.insert( z.message_tail, { set_error( 'chapter_ignored', {chap_param}, true ) } ); -- add error message Chapter = ''; -- and set them to empty string to be safe with concatenation TransChapter = ''; ChapterURL = ''; ScriptChapter = ''; ChapterFormat = ''; end else -- otherwise, format chapter / article title local no_quotes = false; -- default assume that we will be quoting the chapter parameter value if is_set (Contribution) and 0 < #c then -- if this is a contribution with contributor(s) if in_array (Contribution:lower(), cfg.keywords.contribution) then -- and a generic contribution title no_quotes = true; -- then render it unquoted end end Chapter = format_chapter_title (ScriptChapter, Chapter, TransChapter, ChapterURL, ChapterURLorigin, no_quotes); -- Contribution is also in Chapter if is_set (Chapter) then if 'map' == config.CitationClass and is_set (TitleType) then Chapter = Chapter .. ' ' .. TitleType; end Chapter = Chapter .. ChapterFormat .. sepc .. ' '; elseif is_set (ChapterFormat) then -- |chapter= not set but |chapter-format= is so ... Chapter = ChapterFormat .. sepc .. ' '; -- ... ChapterFormat has error message, we want to see it end end -- Format main title. if is_set(TitleLink) and is_set(Title) then Title = "[[" .. TitleLink .. "|" .. Title .. "]]" end if in_array(config.CitationClass, {'web','news','journal', 'magazine', 'pressrelease','podcast', 'newsgroup', 'mailinglist', 'arxiv'}) or ('citation' == config.CitationClass and is_set (Periodical) and not is_set (Encyclopedia)) or ('map' == config.CitationClass and is_set (Periodical)) then -- special case for cite map when the map is in a periodical treat as an article Title = kern_quotes (Title); -- if necessary, separate title's leading and trailing quote marks from Module provided quote marks Title = wrap_style ('quoted-title', Title); Title = script_concatenate (Title, ScriptTitle); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped TransTitle= wrap_style ('trans-quoted-title', TransTitle ); elseif 'report' == config.CitationClass then -- no styling for cite report Title = script_concatenate (Title, ScriptTitle); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped TransTitle= wrap_style ('trans-quoted-title', TransTitle ); -- for cite report, use this form for trans-title else Title = wrap_style ('italic-title', Title); Title = script_concatenate (Title, ScriptTitle); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped TransTitle = wrap_style ('trans-italic-title', TransTitle); end TransError = ""; if is_set(TransTitle) then if is_set(Title) then TransTitle = " " .. TransTitle; else TransError = " " .. set_error( 'trans_missing_title', {'title'} ); end end Title = Title .. TransTitle; if is_set(Title) then if not is_set(TitleLink) and is_set(URL) then Title = external_link( URL, Title, URLorigin ) .. TransError .. Format; URL = ""; Format = ""; else Title = Title .. TransError; end end if is_set(Place) then Place = " " .. wrap_msg ('written', Place, use_lowercase) .. sepc .. " "; end if is_set (Conference) then if is_set (ConferenceURL) then Conference = external_link( ConferenceURL, Conference, ConferenceURLorigin ); end Conference = sepc .. " " .. Conference .. ConferenceFormat; elseif is_set(ConferenceURL) then Conference = sepc .. " " .. external_link( ConferenceURL, nil, ConferenceURLorigin ); end if not is_set(Position) then local Minutes = A['Minutes']; local Time = A['Time']; if is_set(Minutes) then if is_set (Time) then table.insert( z.message_tail, { set_error( 'redundant_parameters', {wrap_style ('parameter', 'minutes') .. ' and ' .. wrap_style ('parameter', 'time')}, true ) } ); end Position = " " .. Minutes .. " " .. cfg.messages['minutes']; else if is_set(Time) then local TimeCaption = A['TimeCaption'] if not is_set(TimeCaption) then TimeCaption = cfg.messages['event']; if sepc ~= '.' then TimeCaption = TimeCaption:lower(); end end Position = " " .. TimeCaption .. " " .. Time; end end else Position = " " .. Position; At = ''; end Page, Pages, Sheet, Sheets = format_pages_sheets (Page, Pages, Sheet, Sheets, config.CitationClass, Periodical_origin, sepc, NoPP, use_lowercase); At = is_set(At) and (sepc .. " " .. At) or ""; Position = is_set(Position) and (sepc .. " " .. Position) or ""; if config.CitationClass == 'map' then local Section = A['Section']; local Sections = A['Sections']; local Inset = A['Inset']; if is_set( Inset ) then Inset = sepc .. " " .. wrap_msg ('inset', Inset, use_lowercase); end if is_set( Sections ) then Section = sepc .. " " .. wrap_msg ('sections', Sections, use_lowercase); elseif is_set( Section ) then Section = sepc .. " " .. wrap_msg ('section', Section, use_lowercase); end At = At .. Inset .. Section; end if is_set (Language) then Language = language_parameter (Language); -- format, categories, name from ISO639-1, etc else Language=""; -- language not specified so make sure this is an empty string; end Others = is_set(Others) and (sepc .. " " .. Others) or ""; if is_set (Translators) then Others = sepc .. ' 由' .. Translators .. '翻译' .. Others; end TitleNote = is_set(TitleNote) and (sepc .. " " .. TitleNote) or ""; if is_set (Edition) then if Edition:match ('%f[%a][Ee]d%.?$') or Edition:match ('%f[%a][Ee]dition$') then add_maint_cat ('extra_text', 'edition'); end Edition = " " .. wrap_msg ('edition', Edition); else Edition = ''; end Series = is_set(Series) and (sepc .. " " .. Series) or ""; OrigYear = is_set(OrigYear) and (" [" .. OrigYear .. "]") or ""; Agency = is_set(Agency) and (sepc .. " " .. Agency) or ""; Volume = format_volume_issue (Volume, Issue, config.CitationClass, Periodical_origin, sepc, use_lowercase); ------------------------------------ totally unrelated data if is_set(Via) then Via = " " .. wrap_msg ('via', Via); end --[[ Subscription implies paywall; Registration does not. If both are used in a citation, the subscription required link note is displayed. There are no error messages for this condition. ]] if is_set (SubscriptionRequired) then SubscriptionRequired = sepc .. " " .. cfg.messages['subscription']; -- subscription required message elseif is_set (RegistrationRequired) then SubscriptionRequired = sepc .. " " .. cfg.messages['registration']; -- registration required message else SubscriptionRequired = ''; -- either or both might be set to something other than yes true y end if is_set(AccessDate) then local retrv_text = " " .. cfg.messages['retrieved'] AccessDate = nowrap_date (AccessDate); -- wrap in nowrap span if date in appropriate format if (sepc ~= ".") then retrv_text = retrv_text:lower() end -- if 'citation', lower case AccessDate = substitute (retrv_text, AccessDate); -- add retrieved text -- neither of these work; don't know why; it seems that substitute() isn't being called AccessDate = substitute (cfg.presentation['accessdate'], {sepc, AccessDate}); -- allow editors to hide accessdates end if is_set(ID) then ID = sepc .." ".. ID; end if "thesis" == config.CitationClass and is_set(Docket) then ID = sepc .." Docket ".. Docket .. ID; end if "report" == config.CitationClass and is_set(Docket) then -- for cite report when |docket= is set ID = sepc .. ' ' .. Docket; -- overwrite ID even if |id= is set end ID_list = build_id_list( ID_list, {IdAccessLevels=ID_access_levels, DoiBroken = DoiBroken, ASINTLD = ASINTLD, IgnoreISBN = IgnoreISBN, Embargo=Embargo, Class = Class} ); if is_set(URL) then URL = " " .. external_link( URL, nil, URLorigin ); end if is_set(Quote) then if Quote:sub(1,1) == '"' and Quote:sub(-1,-1) == '"' then -- if first and last characters of quote are quote marks Quote = Quote:sub(2,-2); -- strip them off end Quote = sepc .." " .. wrap_style ('quoted-text', Quote ); -- wrap in <q>...</q> tags PostScript = ""; -- cs1|2 does not supply terminal punctuation when |quote= is set end local Archived if is_set(ArchiveURL) then if not is_set(ArchiveDate) then ArchiveDate = set_error('archive_missing_date'); end if in_array (DeadURL, {'no', 'live'}) then local arch_text = cfg.messages['archived']; if sepc ~= "." then arch_text = arch_text:lower() end Archived = sepc .. " " .. substitute( cfg.messages['archived-not-dead'], { external_link( ArchiveURL, arch_text, A:ORIGIN('ArchiveURL') ) .. ArchiveFormat, ArchiveDate } ); if not is_set(OriginalURL) then Archived = Archived .. " " .. set_error('archive_missing_url'); end elseif is_set(OriginalURL) then -- DeadURL is empty, 'yes', 'true', 'y', 'dead', 'unfit' or 'usurped' local arch_text = cfg.messages['archived-dead']; if sepc ~= "." then arch_text = arch_text:lower() end if in_array (DeadURL, {'unfit', 'usurped'}) then Archived = sepc .. " " .. '原始内容存档于' .. ArchiveDate; -- format already styled else -- DeadURL is empty, 'yes', 'true', 'y' or 'dead' Archived = sepc .. " " .. substitute( arch_text, { external_link( OriginalURL, cfg.messages['original'], OriginalURLorigin ) .. OriginalFormat, ArchiveDate } ); -- format already styled end else local arch_text = cfg.messages['archived-missing']; if sepc ~= "." then arch_text = arch_text:lower() end Archived = sepc .. " " .. substitute( arch_text, { set_error('archive_missing_url'), ArchiveDate } ); end elseif is_set (ArchiveFormat) then Archived = ArchiveFormat; -- if set and ArchiveURL not set ArchiveFormat has error message else Archived = "" end local Lay = ''; if is_set(LayURL) then if is_set(LayDate) then LayDate = " (" .. LayDate .. ")" end if is_set(LaySource) then LaySource = " &ndash; ''" .. safe_for_italics(LaySource) .. "''"; else LaySource = ""; end if sepc == '.' then Lay = sepc .. " " .. external_link( LayURL, cfg.messages['lay summary'], A:ORIGIN('LayURL') ) .. LayFormat .. LaySource .. LayDate else Lay = sepc .. " " .. external_link( LayURL, cfg.messages['lay summary']:lower(), A:ORIGIN('LayURL') ) .. LayFormat .. LaySource .. LayDate end elseif is_set (LayFormat) then -- Test if |lay-format= is given without giving a |lay-url= Lay = sepc .. LayFormat; -- if set and LayURL not set, then LayFormat has error message end if is_set(Transcript) then if is_set(TranscriptURL) then Transcript = external_link( TranscriptURL, Transcript, TranscriptURLorigin ); end Transcript = sepc .. ' ' .. Transcript .. TranscriptFormat; elseif is_set(TranscriptURL) then Transcript = external_link( TranscriptURL, nil, TranscriptURLorigin ); end local Publisher; if is_set(Periodical) and not in_array(config.CitationClass, {"encyclopaedia","web","pressrelease","podcast"}) then if is_set(PublisherName) then if is_set(PublicationPlace) then Publisher = PublicationPlace .. ": " .. PublisherName; else Publisher = PublisherName; end elseif is_set(PublicationPlace) then Publisher= PublicationPlace; else Publisher = ""; end if is_set(Publisher) then Publisher = " (" .. Publisher .. ")"; end else if is_set(PublisherName) then if is_set(PublicationPlace) then Publisher = sepc .. " " .. PublicationPlace .. ": " .. PublisherName; else Publisher = sepc .. " " .. PublisherName; end elseif is_set(PublicationPlace) then Publisher= sepc .. " " .. PublicationPlace; else Publisher = ''; end end -- Several of the above rely upon detecting this as nil, so do it last. if is_set(Periodical) then if is_set(Title) or is_set(TitleNote) then Periodical = sepc .. " " .. wrap_style ('italic-title', Periodical) else Periodical = wrap_style ('italic-title', Periodical) end end --[[ Handle the oddity that is cite speech. This code overrides whatever may be the value assigned to TitleNote (through |department=) and forces it to be " (Speech)" so that the annotation directly follows the |title= parameter value in the citation rather than the |event= parameter value (if provided). ]] if "speech" == config.CitationClass then -- cite speech only TitleNote = " (Speech)"; -- annotate the citation if is_set (Periodical) then -- if Periodical, perhaps because of an included |website= or |journal= parameter if is_set (Conference) then -- and if |event= is set Conference = Conference .. sepc .. " "; -- then add appropriate punctuation to the end of the Conference variable before rendering end end end -- Piece all bits together at last. Here, all should be non-nil. -- We build things this way because it is more efficient in LUA -- not to keep reassigning to the same string variable over and over. local tcommon; local tcommon2; -- used for book cite when |contributor= is set if in_array(config.CitationClass, {"journal","citation"}) and is_set(Periodical) then if is_set(Others) then Others = Others .. sepc .. " " end tcommon = safe_join( {Others, Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Edition, Publisher, Agency}, sepc ); elseif in_array(config.CitationClass, {"book","citation"}) and not is_set(Periodical) then -- special cases for book cites if is_set (Contributors) then -- when we are citing foreword, preface, introduction, etc tcommon = safe_join( {Title, TitleNote}, sepc ); -- author and other stuff will come after this and before tcommon2 tcommon2 = safe_join( {Conference, Periodical, Format, TitleType, Series, Volume, Others, Edition, Publisher, Agency}, sepc ); else tcommon = safe_join( {Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Volume, Others, Edition, Publisher, Agency}, sepc ); end elseif 'map' == config.CitationClass then -- special cases for cite map if is_set (Chapter) then -- map in a book; TitleType is part of Chapter tcommon = safe_join( {Title, Format, Edition, Scale, Series, Cartography, Others, Publisher, Volume}, sepc ); elseif is_set (Periodical) then -- map in a periodical tcommon = safe_join( {Title, TitleType, Format, Periodical, Scale, Series, Cartography, Others, Publisher, Volume}, sepc ); else -- a sheet or stand-alone map tcommon = safe_join( {Title, TitleType, Format, Edition, Scale, Series, Cartography, Others, Publisher}, sepc ); end elseif 'episode' == config.CitationClass then -- special case for cite episode tcommon = safe_join( {Title, TitleNote, TitleType, Series, Transcript, Edition, Publisher}, sepc ); else -- all other CS1 templates tcommon = safe_join( {Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Volume, Others, Edition, Publisher, Agency}, sepc ); end if #ID_list > 0 then ID_list = safe_join( { sepc .. " ", table.concat( ID_list, sepc .. " " ), ID }, sepc ); else ID_list = ID; end -- LOCAL local xDate = Date local pgtext = Position .. Sheet .. Sheets .. Page .. Pages .. At; if ( is_set(Periodical) and Date ~= '' and not in_array(config.CitationClass, {"encyclopaedia","web"}) ) or ( in_array(config.CitationClass, {"book","news"}) ) then if in_array(config.CitationClass, {"journal","citation"}) and ( Volume ~= '' or Issue ~= '' ) then xDate = xDate .. ',' .. Volume end xDate = xDate .. pgtext pgtext = '' end if PublicationDate and PublicationDate ~= '' then xDate = xDate .. ' (' .. PublicationDate .. ')' end if OrigYear ~= '' then xDate = xDate .. OrigYear end if AccessDate ~= '' then xDate = xDate .. ' ' .. AccessDate end if xDate ~= '' then xDate = sepc .. ' ' .. xDate end -- END LOCAL local idcommon = safe_join( { URL, xDate, ID_list, Archived, Via, SubscriptionRequired, Lay, Language, Quote }, sepc ); local text; if is_set(Authors) then if is_set(Coauthors) then if 'vanc' == NameListFormat then -- separate authors and coauthors with proper name-list-separator Authors = Authors .. ', ' .. Coauthors; else Authors = Authors .. '; ' .. Coauthors; end end Authors = terminate_name_list (Authors, sepc); -- when no date, terminate with 0 or 1 sepc and a space if is_set(Editors) then local in_text = " "; local post_text = ""; if is_set(Chapter) and 0 == #c then in_text = in_text .. " " .. cfg.messages['in'] if (sepc ~= '.') then in_text = in_text:lower() end -- lowercase for cs2 else if EditorCount <= 1 then post_text = ", " .. cfg.messages['editor']; else post_text = ", " .. cfg.messages['editors']; end end Editors = terminate_name_list (Editors .. in_text .. post_text, sepc); -- terminate with 0 or 1 sepc and a space end if is_set (Contributors) then -- book cite and we're citing the intro, preface, etc local by_text = sepc .. ' ' .. cfg.messages['by'] .. ' '; if (sepc ~= '.') then by_text = by_text:lower() end -- lowercase for cs2 Authors = by_text .. Authors; -- author follows title so tweak it here if is_set (Editors) then -- when Editors make sure that Authors gets terminated Authors = terminate_name_list (Authors, sepc); -- terminate with 0 or 1 sepc and a space end Contributors = terminate_name_list (Contributors, sepc); -- terminate with 0 or 1 sepc and a space text = safe_join( {Contributors, Chapter, tcommon, Authors, Place, Editors, tcommon2, pgtext, idcommon }, sepc ); else text = safe_join( {Authors, Chapter, Place, Editors, tcommon, pgtext, idcommon }, sepc ); end elseif is_set(Editors) then if EditorCount <= 1 then Editors = Editors .. " (" .. cfg.messages['editor'] .. ")" .. sepc .. " " else Editors = Editors .. " (" .. cfg.messages['editors'] .. ")" .. sepc .. " " end text = safe_join( {Editors, Chapter, Place, tcommon, pgtext, idcommon}, sepc ); else if config.CitationClass=="journal" and is_set(Periodical) then text = safe_join( {Chapter, Place, tcommon, pgtext, idcommon}, sepc ); else text = safe_join( {Chapter, Place, tcommon, pgtext, idcommon}, sepc ); end end if is_set(PostScript) and PostScript ~= sepc then text = safe_join( {text, sepc}, sepc ); --Deals with italics, spaces, etc. text = text:sub(1,-sepc:len()-1); end text = safe_join( {text, PostScript}, sepc ); -- Now enclose the whole thing in a <cite/> element local options = {}; if is_set(config.CitationClass) and config.CitationClass ~= "citation" then options.class = config.CitationClass; options.class = "citation " .. config.CitationClass; -- class=citation required for blue highlight when used with |ref= else options.class = "citation"; end if is_set(Ref) and Ref:lower() ~= "none" then -- set reference anchor if appropriate local id = Ref if ('harv' == Ref ) then local namelist = {}; -- holds selected contributor, author, editor name list -- local year = first_set (Year, anchor_year); -- Year first for legacy citations and for YMD dates that require disambiguation local year = first_set ({Year, anchor_year}, 2); -- Year first for legacy citations and for YMD dates that require disambiguation if #c > 0 then -- if there is a contributor list namelist = c; -- select it elseif #a > 0 then -- or an author list namelist = a; elseif #e > 0 then -- or an editor list namelist = e; end id = anchor_id (namelist, year); -- go make the CITEREF anchor end options.id = id; end if string.len(text:gsub("<span[^>/]*>.-</span>", ""):gsub("%b<>","")) <= 2 then z.error_categories = {}; text = set_error('empty_citation'); z.message_tail = {}; end if is_set(options.id) then text = '<cite id="' .. mw.uri.anchorEncode(options.id) ..'" class="' .. mw.text.nowiki(options.class) .. '">' .. text .. "</cite>"; else text = '<cite class="' .. mw.text.nowiki(options.class) .. '">' .. text .. "</cite>"; end local empty_span = '<span style="display:none;">&nbsp;</span>'; -- Note: Using display: none on the COinS span breaks some clients. local OCinS = '<span title="' .. OCinSoutput .. '" class="Z3988">' .. empty_span .. '</span>'; text = text .. OCinS; if #z.message_tail ~= 0 then text = text .. " "; for i,v in ipairs( z.message_tail ) do if is_set(v[1]) then if i == #z.message_tail then text = text .. error_comment( v[1], v[2] ); else text = text .. error_comment( v[1] .. "; ", v[2] ); end end end end if #z.maintenance_cats ~= 0 then text = text .. '<span class="citation-comment" style="display:none; color:#33aa33">'; for _, v in ipairs( z.maintenance_cats ) do -- append maintenance categories text = text .. ' ' .. v .. ' ([[:Category:' .. v ..'|link]])'; end text = text .. '</span>'; -- maintenance mesages (realy just the names of the categories for now) end no_tracking_cats = no_tracking_cats:lower(); if in_array(no_tracking_cats, {"", "no", "false", "n"}) then for _, v in ipairs( z.error_categories ) do text = text .. '[[Category:' .. v ..']]'; end for _, v in ipairs( z.maintenance_cats ) do -- append maintenance categories text = text .. '[[Category:' .. v ..']]'; end for _, v in ipairs( z.properties_cats ) do -- append maintenance categories text = text .. '[[Category:' .. v ..']]'; end end return text end --[[--------------------------< H A S _ I N V I S I B L E _ C H A R S >---------------------------------------- This function searches a parameter's value for nonprintable or invisible characters. The search stops at the first match. Sometime after this module is done with rendering a citation, some C0 control characters are replaced with the replacement character. That replacement character is not detected by this test though it is visible to readers of the rendered citation. This function will detect the replacement character when it is part of the wikisource. Output of this function is an error message that identifies the character or the Unicode group that the character belongs to along with its position in the parameter value. ]] --[[ local function has_invisible_chars (param, v) local position = ''; local i=1; while cfg.invisible_chars[i] do local char=cfg.invisible_chars[i][1] -- the character or group name local pattern=cfg.invisible_chars[i][2] -- the pattern used to find it v = mw.text.unstripNoWiki( v ); -- remove nowiki stripmarkers position = mw.ustring.find (v, pattern) -- see if the parameter value contains characters that match the pattern if position then table.insert( z.message_tail, { set_error( 'invisible_char', {char, wrap_style ('parameter', param), position}, true ) } ); -- add error message return; -- and done with this parameter end i=i+1; -- bump our index end end ]] --[[--------------------------< Z . C I T A T I O N >---------------------------------------------------------- This is used by templates such as {{cite book}} to create the actual citation text. ]] function citation(frame) local pframe = frame:getParent() local validation, identifiers, utilities; if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then -- did the {{#invoke:}} use sandbox version? cfg = mw.loadData ('Module:Citation/CS1/Configuration/sandbox'); -- load sandbox versions of Configuration and Whitelist and ... whitelist = mw.loadData ('Module:Citation/CS1/Whitelist/sandbox'); validation = require ('Module:Citation/CS1/Date_validation/sandbox'); -- ... sandbox version of date validation code identifiers = require ('Module:Citation/CS1/Identifiers/sandbox'); utilities = require ('Module:Citation/CS1/Utilities/sandbox'); else -- otherwise cfg = mw.loadData ('Module:Citation/CS1/Configuration'); -- load live versions of Configuration and Whitelist and ... whitelist = mw.loadData ('Module:Citation/CS1/Whitelist'); validation = require ('Module:Citation/CS1/Date_validation'); -- ... live version of date validation code identifiers = require ('Module:Citation/CS1/Identifiers'); utilities = require ('Module:Citation/CS1/Utilities'); end utilities.set_selected_modules (cfg); identifiers.set_selected_modules (cfg,utilities,validation); dates = validation.dates; -- imported functions year_date_check = validation.year_date_check; z = utilities.z; is_set = utilities.is_set; first_set = utilities.first_set; is_url = utilities.is_url; split_url = utilities.split_url; add_maint_cat = utilities.add_maint_cat; add_prop_cat = utilities.add_prop_cat; error_comment = utilities.error_comment; in_array = utilities.in_array; substitute = utilities.substitute; set_error = utilities.set_error; extract_ids = identifiers.extract_ids; build_id_list = identifiers.build_id_list; is_embargoed = identifiers.is_embargoed; extract_id_access_levels = identifiers.extract_id_access_levels; local args = {}; local suggestions = {}; local error_text, error_state; local config = {}; for k, v in pairs( frame.args ) do config[k] = v; args[k] = v; end local capture; -- the single supported capture when matching unknown parameters using patterns for k, v in pairs( pframe.args ) do if v ~= '' then if not validate( k ) then error_text = ""; if type( k ) ~= 'string' then -- Exclude empty numbered parameters if v:match("%S+") ~= nil then error_text, error_state = set_error( 'text_ignored', {v}, true ); end elseif validate( k:lower() ) then error_text, error_state = set_error( 'parameter_ignored_suggest', {k, k:lower()}, true ); else if nil == suggestions.suggestions then -- if this table is nil then we need to load it if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then -- did the {{#invoke:}} use sandbox version? suggestions = mw.loadData( 'Module:Citation/CS1/Suggestions/sandbox' ); -- use the sandbox version else suggestions = mw.loadData( 'Module:Citation/CS1/Suggestions' ); -- use the live version end end for pattern, param in pairs (suggestions.patterns) do -- loop through the patterns to see if we can suggest a proper parameter capture = k:match (pattern); -- the whole match if no caputre in pattern else the capture if a match if capture then -- if the pattern matches param = substitute( param, capture ); -- add the capture to the suggested parameter (typically the enumerator) error_text, error_state = set_error( 'parameter_ignored_suggest', {k, param}, true ); -- set the error message end end if not is_set (error_text) then -- couldn't match with a pattern, is there an expicit suggestion? if suggestions.suggestions[ k:lower() ] ~= nil then error_text, error_state = set_error( 'parameter_ignored_suggest', {k, suggestions.suggestions[ k:lower() ]}, true ); else error_text, error_state = set_error( 'parameter_ignored', {k}, true ); end end end if error_text ~= '' then table.insert( z.message_tail, {error_text, error_state} ); end end args[k] = v; elseif args[k] ~= nil or (k == 'postscript') then args[k] = v; end end for k, v in pairs( args ) do if 'string' == type (k) then -- don't evaluate positional parameters has_invisible_chars (k, v); end end return citation0( config, args) end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return {citation = citation}; 3e93142cd340b6840f1f3c8adbad4646ccef01b5 Template:Documentation/docname 10 20 32 2022-09-24T01:18:16Z Richard Robin 2 创建页面,内容为“{{SUBJECTPAGENAME}}/doc<noinclude> <!-- 中文还没有建立模板的沙盒和用例测试,先直接返回/doc子页面。 --> {{#switch: {{SUBPAGENAME}} |沙盒|sandbox|案例测试|testcases={{ #rel2abs: ../doc }} |#default={{SUBJECTPAGENAME}}/doc }}</noinclude><noinclude> 本模板沒有可以輸入的參數。 [[Category:模板页的模板]]</noinclude>” wikitext text/x-wiki {{SUBJECTPAGENAME}}/doc<noinclude> <!-- 中文还没有建立模板的沙盒和用例测试,先直接返回/doc子页面。 --> {{#switch: {{SUBPAGENAME}} |沙盒|sandbox|案例测试|testcases={{ #rel2abs: ../doc }} |#default={{SUBJECTPAGENAME}}/doc }}</noinclude><noinclude> 本模板沒有可以輸入的參數。 [[Category:模板页的模板]]</noinclude> 776ec8b2e2664b211d301c21aa10db0fca83fea7 Template:Cite web/doc 10 21 33 2022-09-24T01:19:07Z Richard Robin 2 创建页面,内容为“描写维基条目时经常需要参考网络上的各种资源,因此更多地使用这个模板可以将所参考的来源记录下来,以便浏览者以及之后的编写者找到这些来源资料。此模板基于维基百科的[[wikipedia:Template:Cite web|Template:Cite web]]模板。 由于此模板仅用于生成引用出处的文本,因此你需要将此模板的调用放置在<code><nowiki><ref>...</ref></nowiki></code>中。具体可以参考…” wikitext text/x-wiki 描写维基条目时经常需要参考网络上的各种资源,因此更多地使用这个模板可以将所参考的来源记录下来,以便浏览者以及之后的编写者找到这些来源资料。此模板基于维基百科的[[wikipedia:Template:Cite web|Template:Cite web]]模板。 由于此模板仅用于生成引用出处的文本,因此你需要将此模板的调用放置在<code><nowiki><ref>...</ref></nowiki></code>中。具体可以参考下文中的第一个用法。 == 用法 == 在下面的代码上连击三次鼠标以全选,然后按下 Ctrl+C 以复制。粘贴到源代码编辑器后填入参数,最后把不需要的空参数删掉即可。注意,某些参数(如 url 、 title 、 accessdate)是必须填写的。 对于普通的网站引用,建议使用下面的格式 <div style="border: 1px solid;"> ;使用作者参数(带有当前查阅日期) ;在下面的代码上连击三次鼠标以全选 <nowiki><ref>{{Cite web |url= |title= |accessdate=</nowiki>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}<nowiki> |author= |work= |date= |quote= }}</ref></nowiki> </div> 对于存在镜像存档的网站引用,建议使用下面的格式 <div style="border: 1px solid;"> ;使用作者参数和存档参数(带有当前查阅日期) ;在下面的代码上连击三次鼠标以全选 <nowiki><ref>{{Cite web |url= |title= |accessdate=</nowiki>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}<nowiki> |author= |work= |date= |archiveurl= |archivedate= |quote= }}</ref></nowiki> </div> 其中, :''url''是网页的地址。例如 <nowiki>http://erinhunter.katecary.co.uk/kate-answers-questions-moths/</nowiki> 。 :''title''是网页的标题。对于博客而言,一般是博客文章的标题。 :''author''建议填写作者的英文名称,根据博客或者Facebook上面的描述确定。例如Vicky在Facebook上叫Vicky Holmes,而不是Victoria Holmes。 :''work''是网站的名称,如<code>Facebook</code>、<code>BlogClan</code>。 :''date''是指网页创建/博客或评论发表的日期。''accessdate''是网页被访问的日期。建议使用 ISO 8061 YYYY-MM-DD 日期格式,例如: {{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}} 。 :''quote''是对原文的引用。此属性通常可以留空。如有必要,请'''简要'''摘出原文。 === 维基百科提供的某些用法 === ;常用格式(带有当前查阅日期) <tt><nowiki>{{Cite web |url= |title= |accessdate=</nowiki>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}<nowiki> |work= |publisher= |date= }}</nowiki></tt> ;使用作者姓名参数(名在前,姓在后)以及共同作者参数(带有当前查阅日期) <tt><nowiki>{{Cite web |url= |title= |accessdate=</nowiki>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}<nowiki> |last= |first= |coauthors= |date= |work= |publisher=}}</nowiki></tt> ;使用作者参数(带有当前查阅日期) <tt><nowiki>{{Cite web |url= |title= |accessdate=</nowiki>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}<nowiki> |author= |date= |work= |publisher=}}</nowiki></tt> ;使用非链式查阅日期格式及最终作者、最初作者参数 <tt><nowiki>{{Cite web |url= |title= |accessmonthday= |last= |first= |date= |work= |publisher= }}</nowiki></tt> ;使用非链式查阅日期格式及作者参数 <tt><nowiki>{{Cite web |url= |title= |accessmonthday= |author= |date= |work= |publisher= }}</nowiki></tt> === Wikia Templates 提供的某些用法 === ;Common form for cases where little is known about authorship of the page (with current date) <tt><nowiki>{{cite web |url= |title= |accessdate=</nowiki>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}<nowiki> |format= |work= }}</nowiki></tt> ;Using last, first (with current date) <tt><nowiki>{{cite web |url= |title= |accessdate=</nowiki>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}<nowiki> |last= |first= |authorlink= |coauthors= |date= |year= |month= |format= |work= |publisher= |pages= |language= |archiveurl= |archivedate= |quote= }}</nowiki></tt> ;Using author (with current date) <tt><nowiki>{{cite web |url= |title= |accessdate=</nowiki>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}<nowiki> |author= |authorlink= |coauthors= |date= |year= |month= |format= |work= |publisher= |pages= |language= |archiveurl= |archivedate= |quote= }}</nowiki></tt> ;Using non-linked retrieved date, last, first <tt><nowiki>{{cite web |url= |title= |accessmonthday= |accessyear= |last= |first= |authorlink= |coauthors= |date= |year= |month= |format= |work= |publisher= |pages= |language= |archiveurl= |archivedate= |quote= }}</nowiki></tt> ;Using non-linked retrieved date, author <tt><nowiki>{{cite web |url= |title= |accessmonthday= |accessyear= |author= |authorlink= |coauthors= |date= |year= |month= |format= |work= |publisher= |pages= |language= |archiveurl= |archivedate= |quote= }}</nowiki></tt> ;All parameters <pre>{{cite web | url = | title = | accessdate = | accessmonthday = | accessyear = | author = | last = | first = | authorlink = | coauthors = | date = | year = | month = | format = | work = | publisher = | pages = | language = | archiveurl = | archivedate = | quote = }}</pre> === 必填参数 === * '''url''': URL of online item. * '''title''': Title of online item. ''For producing a [[wikipedia:WP:CONTEXT#Dates|wikilinked date]] of retrieval:'' :* '''accessdate''': Full date when item was accessed, in ISO 8601 YYYY-MM-DD format, for example "accessdate = 2006-02-17". ''Must not be wikilinked'' ''For producing a non-wikilinked date of retrieval:'' :* '''accessmonthday''' and '''accessyear''': Month and day when item was accessed, for example "accessmonthday = May 10", <u>and</u> year when item was accessed, for example "accessyear = 2005". <includeonly> [[Category:引用模板]] </includeonly><noinclude> [[Category:Template documentation]]</noinclude> 73a58f5e56e5fa9951ced49682d4b04e50505b6d Module:Citation/CS1/Configuration 828 22 34 2022-09-24T01:20:05Z Richard Robin 2 创建页面,内容为“ local citation_config = {}; -- override <code>...</code> styling to remove color, border, and padding. <code> css is specified here: -- https://git.wikimedia.org/blob/mediawiki%2Fcore.git/69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199 local code_style="color:inherit; border:inherit; padding:inherit;"; --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------ List of na…” Scribunto text/plain local citation_config = {}; -- override <code>...</code> styling to remove color, border, and padding. <code> css is specified here: -- https://git.wikimedia.org/blob/mediawiki%2Fcore.git/69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199 local code_style="color:inherit; border:inherit; padding:inherit;"; --[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------ List of namespaces that should not be included in citation error categories. Same as setting notracking = true by default Note: Namespace names should use underscores instead of spaces. ]] local uncategorized_namespaces = { 'User', 'Talk', 'User_talk', 'Wikipedia_talk', 'File_talk', 'Template_talk', 'Help_talk', 'Category_talk', 'Portal_talk', 'Book_talk', 'Draft', 'Draft_talk', 'Education_Program_talk', 'Module_talk', 'MediaWiki_talk' }; local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases'}; -- list of Lua patterns found in page names of pages we should not categorize --[[--------------------------< M E S S A G E S >-------------------------------------------------------------- Translation table The following contains fixed text that may be output as part of a citation. This is separated from the main body to aid in future translations of this module. ]] local messages = { ['archived-dead'] = '($1存档于$2)', ['archived-not-dead'] = '(原始内容$1于$2)', ['archived-missing'] = '(原始内容$1存档于$2)', ['archived'] = '存档', ['by'] = 'By', -- contributions to authored works: introduction, foreword, afterword ['cartography'] = 'Cartography by $1', ['editor'] = '编', ['editors'] = '编', ['edition'] = '$1', ['episode'] = '第$1集', ['et al'] = '等', ['in'] = '(编)', -- edited works ['inactive'] = '不活跃', ['inset'] = '$1 inset', ['lay summary'] = '简明摘要', ['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]:&nbsp;$1', ['original'] = '原始内容', ['published'] = '$1', ['retrieved'] = '&#91;$1&#93;', ['season'] = '第$1季', ['section'] = '§ $1', ['sections'] = '§§ $1', ['series'] = '第$1系列', ['type'] = ' ($1)', -- for titletype ['written'] = '写于$1', ['vol'] = '$1 Vol.&nbsp;$2', -- $1 is sepc; bold journal style volume is in presentation{} ['vol-no'] = '$1 Vol.&nbsp;$2 no.&nbsp;$3', -- sepc, volume, issue ['issue'] = '$1 No.&nbsp;$2', -- $1 is sepc ['j-vol'] = '$1 $2', -- sepc, volume; bold journal volume is in presentation{} ['j-issue'] = ' ($1)', ['nopp'] = '$1 $2'; -- page(s) without prefix; $1 is sepc ['p-prefix'] = ": $2", -- $1 is sepc ['pp-prefix'] = ": $2", -- $1 is sepc ['j-page(s)'] = ': $1', -- same for page and pages ['sheet'] = '$1 Sheet&nbsp;$2', -- $1 is sepc ['sheets'] = '$1 Sheets&nbsp;$2', -- $1 is sepc ['j-sheet'] = ': Sheet&nbsp;$1', ['j-sheets'] = ': Sheets&nbsp;$1', ['subscription'] = '[[File:Lock-red-alt.svg|9px|link=|alt=需要付费订阅|需要付费订阅]]' .. '[[Category:含有連結內容需訂閱查看的頁面]]', ['registration']='[[File:Lock-blue-alt-2.svg|9px|link=|alt=需要免费注册|需要免费注册]]' .. '[[Category:含有內容需登入查看的頁面]]', ['language'] = '<span style="font-family: sans-serif; cursor: default; color:#555; font-size: 0.8em; bottom: 0.1em; font-weight: bold;" title="连接到$1网页">($1)</span>', ['via'] = " &ndash;-{zh-hans:通过;zh-hant:透過;}-$1", ['event'] = '事件发生在', ['minutes'] = '记录于', ['parameter-separator'] = '、', ['parameter-final-separator'] = '和', ['parameter-pair-separator'] = '和', -- Determines the location of the help page ['help page link'] = 'Help:引文格式1错误', ['help page label'] = '帮助', -- Internal errors (should only occur if configuration is bad) ['undefined_error'] = '调用了一个未定义的错误条件', ['unknown_manual_ID'] = '无法识别的手动ID模式', ['unknown_ID_mode'] = '无法识别的ID模式', ['unknown_argument_map'] = 'Argument map not defined for this variable', ['bare_url_no_origin'] = 'Bare url found but origin indicator is nil or empty', } --[[--------------------------< P R E S E N T A T I O N >------------------------------------------------------ Fixed presentation markup. Originally part of citation_config.messages it has been moved into its own, more semantically correct place. ]] local presentation = { -- Error output -- .error class is specified at https://git.wikimedia.org/blob/mediawiki%2Fcore.git/9553bd02a5595da05c184f7521721fb1b79b3935/skins%2Fcommon%2Fshared.css#L538 -- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display ['hidden-error'] = '<span style="display:none;font-size:100%" class="error citation-comment">$1</span>', ['visible-error'] = '<span style="font-size:100%" class="error citation-comment">$1</span>', ['accessdate'] = '<span class="reference-accessdate">$2</span>', -- to allow editors to hide accessdate using personal css ['bdi'] = '<bdi$1>$2</bdi>', -- bidirectional isolation used with |script-title= and the like ['format'] = ' <span style="font-size:85%;">($1)</span>', -- for |format=, |chapter-format=, etc ['access-signal'] = '<span class="plainlinks">$1&#8239;$2</span>', -- external link with appropriate lock icon ['free'] = '[[File:Lock-green.svg|9px|link=|alt=可免费查阅|可免费查阅]]', ['registration'] = '[[File:Lock-blue-alt-2.svg|9px|link=|alt=需要免费注册|需要免费注册]]', ['limited'] = '[[File:Lock-blue-alt-2.svg|9px|link=|alt=有限度免费查阅,超限则需付费订阅|有限度免费查阅,超限则需付费订阅]]', ['subscription'] = '[[File:Lock-red-alt.svg|9px|link=|alt=需要付费订阅|需要付费订阅]]', ['italic-title'] = "$1", ['kern-left'] = '<span style="padding-left:0.2em;">$1</span>$2', -- spacing to use when title contains leading single or double quote mark ['kern-right'] = '$1<span style="padding-right:0.2em;">$2</span>', -- spacing to use when title contains trailing single or double quote mark ['nowrap1'] = '<span class="nowrap">$1</span>', -- for nowrapping an item: <span ...>yyyy-mm-dd</span> ['nowrap2'] = '<span class="nowrap">$1</span> $2', -- for nowrapping portions of an item: <span ...>dd mmmm</span> yyyy (note white space) ['parameter'] = '<code style="'..code_style..'">&#124;$1=</code>', ['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content ['quoted-title'] = '$1', ['trans-italic-title'] = "&#91;$1&#93;", ['trans-quoted-title'] = "&#91;$1&#93;", ['vol-bold'] = ' <b>$1</b>', -- for journal cites; for other cites ['vol'] in messages{} } --[[--------------------------< A L I A S E S >---------------------------------------------------------------- Aliases table for commonly passed parameters ]] local aliases = { ['AccessDate'] = {'access-date', 'accessdate'}, ['Agency'] = 'agency', ['AirDate'] = {'air-date', 'airdate'}, ['ArchiveDate'] = {'archive-date', 'archivedate'}, ['ArchiveFormat'] = 'archive-format', ['ArchiveURL'] = {'archive-url', 'archiveurl'}, ['ASINTLD'] = {'ASIN-TLD', 'asin-tld'}, ['At'] = 'at', ['Authors'] = {'authors', 'people', 'host', 'credits'}, ['BookTitle'] = {'book-title', 'booktitle'}, ['Callsign'] = {'call-sign', 'callsign'}, -- cite interview ['Cartography'] = 'cartography', ['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'}, ['ChapterFormat'] = {'chapter-format', 'contribution-format', 'section-format'}; ['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'section-url', 'sectionurl'}, ['City'] = 'city', -- cite interview ['Class'] = 'class', -- cite arxiv and arxiv identifiers ['Coauthors'] = {'coauthors', 'coauthor'}, -- coauthor and coauthors are deprecated; remove after 1 January 2015? ['Conference'] = {'conference', 'event'}, ['ConferenceFormat'] = {'conference-format', 'event-format'}, ['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl'}, ['Contribution'] = 'contribution', -- introduction, foreword, afterword, etc; required when |contributor= set ['Date'] = {'date', 'air-date', 'airdate'}, ['DeadURL'] = {'dead-url', 'deadurl','url-status','urlstatus'}, ['Degree'] = 'degree', ['DF'] = 'df', ['DisplayAuthors'] = {'display-authors', 'displayauthors'}, ['DisplayEditors'] = {'display-editors', 'displayeditors'}, ['Docket'] = 'docket', ['DoiBroken'] = {'doi-broken', 'doi-broken-date', 'doi-inactive-date', 'doi_brokendate', 'doi_inactivedate'}, ['Edition'] = 'edition', ['Editors'] = 'editors', ['Embargo'] = 'embargo', ['Encyclopedia'] = {'encyclopedia', 'encyclopaedia'}, -- this one only used by citation ['Episode'] = 'episode', -- cite serial only TODO: make available to cite episode? ['Format'] = 'format', ['ID'] = {'id', 'ID'}, ['IgnoreISBN'] = {'ignore-isbn-error', 'ignoreisbnerror'}, ['Inset'] = 'inset', ['Issue'] = {'issue', 'number'}, ['Language'] = {'language', 'in'}, ['LastAuthorAmp'] = {'last-author-amp', 'lastauthoramp'}, ['LayDate'] = {'lay-date', 'laydate'}, ['LayFormat'] = 'lay-format', ['LaySource'] = {'lay-source', 'laysource'}, ['LayURL'] = {'lay-url', 'lay-summary', 'layurl', 'laysummary'}, ['MailingList'] = {'mailinglist', 'mailing-list'}, -- cite mailing list only ['Map'] = 'map', -- cite map only ['MapFormat'] = 'map-format', -- cite map only ['MapURL'] = {'mapurl', 'map-url'}, -- cite map only ['MessageID'] = 'message-id', ['Minutes'] = 'minutes', ['Mode'] = 'mode', ['NameListFormat'] = 'name-list-format', ['Network'] = 'network', ['NoPP'] = {'no-pp', 'nopp'}, ['NoTracking'] = {'template-doc-demo', 'template doc demo', 'no-cat', 'nocat', 'no-tracking', 'notracking'}, ['Number'] = 'number', -- this case only for cite techreport ['OrigYear'] = {'orig-year', 'origyear'}, ['Others'] = {'others', 'interviewer', 'interviewers'}, ['Page'] = {'p', 'page'}, ['Pages'] = {'pp', 'pages'}, ['Periodical'] = {'journal', 'newspaper', 'magazine', 'work', 'website', 'periodical', 'encyclopedia', 'encyclopaedia', 'dictionary', 'mailinglist'}, ['Place'] = {'place', 'location'}, ['Program'] = 'program', -- cite interview ['PostScript'] = 'postscript', ['PublicationDate'] = {'publicationdate', 'publication-date'}, ['PublicationPlace'] = {'publication-place', 'publicationplace'}, ['PublisherName'] = {'publisher', 'distributor', 'institution', 'newsgroup'}, ['Quote'] = {'quote', 'quotation'}, ['Ref'] = 'ref', ['RegistrationRequired'] = 'registration', ['Scale'] = 'scale', ['ScriptChapter'] = 'script-chapter', ['ScriptTitle'] = 'script-title', ['Section'] = 'section', ['Season'] = 'season', ['Sections'] = 'sections', -- cite map only ['Series'] = {'series', 'version'}, ['SeriesSeparator'] = 'series-separator', ['SeriesLink'] = {'series-link', 'serieslink'}, ['SeriesNumber'] = {'series-number', 'series-no', 'seriesnumber', 'seriesno'}, ['Sheet'] = 'sheet', -- cite map only ['Sheets'] = 'sheets', -- cite map only ['Station'] = 'station', ['SubscriptionRequired'] = 'subscription', ['Time'] = 'time', ['TimeCaption'] = {'time-caption', 'timecaption'}, ['Title'] = 'title', ['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink'}, ['TitleNote'] = 'department', ['TitleType'] = {'type', 'medium'}, ['TransChapter'] = {'trans-chapter', 'trans_chapter'}, ['TransMap'] = 'trans-map', -- cite map only ['Transcript'] = 'transcript', ['TranscriptFormat'] = 'transcript-format', ['TranscriptURL'] = {'transcript-url', 'transcripturl'}, ['TransTitle'] = {'trans-title', 'trans_title', 'title_zh'}, ['URL'] = {'url', 'URL'}, ['UrlAccess']={'url-access','urlaccess'}, ['Vauthors'] = 'vauthors', ['Veditors'] = 'veditors', ['Via'] = 'via', ['Volume'] = 'volume', ['Year'] = 'year', ['AuthorList-First'] = {"first#", "given#", "author-first#", "author#-first"}, ['AuthorList-Last'] = {"last#", "author#", "surname#", "author-last#", "author#-last", "subject#"}, ['AuthorList-Link'] = {"authorlink#", "author-link#", "author#-link", "subjectlink#", "author#link", "subject-link#", "subject#-link", "subject#link"}, ['AuthorList-Mask'] = {"author-mask#", "authormask#", "author#mask", "author#-mask"}, ['ContributorList-First'] = {'contributor-first#','contributor#-first'}, ['ContributorList-Last'] = {'contributor#', 'contributor-last#', 'contributor#-last'}, ['ContributorList-Link'] = {'contributor-link#', 'contributor#-link'}, ['ContributorList-Mask'] = {'contributor-mask#', 'contributor#-mask'}, ['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given"}, ['EditorList-Last'] = {"editor#", "editor-last#", "editor#-last", "editor-surname#", "editor#-surname"}, ['EditorList-Link'] = {"editor-link#", "editor#-link", "editorlink#", "editor#link"}, ['EditorList-Mask'] = {"editor-mask#", "editor#-mask", "editormask#", "editor#mask"}, ['TranslatorList-First'] = {'translator-first#','translator#-first'}, ['TranslatorList-Last'] = {'translator#', 'translator-last#', 'translator#-last'}, ['TranslatorList-Link'] = {'translator-link#', 'translator#-link'}, ['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'}, } --[[--------------------------< D E F A U L T S >-------------------------------------------------------------- Default parameter values TODO: keep this? Only one default? ]] local defaults = { ['DeadURL'] = 'yes', } --[[--------------------------< V O L U M E , I S S U E , P A G E S >---------------------------------------- These tables hold cite class values (from the template invocation) and identify those templates that support |volume=, |issue=, and |page(s)= parameters. Cite conference and cite map require further qualification which is handled in the main module. ]] local templates_using_volume = {'citation', 'audio-visual', 'book', 'conference', 'encyclopaedia', 'interview', 'journal', 'magazine', 'map', 'news', 'report', 'techreport'} local templates_using_issue = {'citation', 'conference', 'episode', 'interview', 'journal', 'magazine', 'map', 'news'} local templates_not_using_page = {'audio-visual', 'episode', 'mailinglist', 'newsgroup', 'podcast', 'serial', 'sign', 'speech'} --[[--------------------------< K E Y W O R D S >-------------------------------------------------------------- This table holds keywords for those parameters that have defined sets of acceptible keywords. ]] local keywords = { ['yes_true_y'] = {'yes', 'true', 'y'}, -- ignore-isbn-error, last-author-amp, no-tracking, nopp, registration, subscription ['deadurl'] = {'yes', 'true', 'y', 'dead', 'no', 'live', 'unfit', 'usurped'}, ['mode'] = {'cs1', 'cs2'}, ['name-list-format'] = {'vanc'}, ['contribution'] = {'afterword', 'foreword', 'introduction', 'preface'}, -- generic contribution titles that are rendered unquoted in the 'chapter' position ['date-format'] = {'dmy', 'dmy-all', 'mdy', 'mdy-all', 'ymd', 'ymd-all'}, ['id-access'] = {'free'}, } --[[--------------------------< I N V I S I B L E _ C H A R A C T E R S >-------------------------------------- This table holds non-printing or invisible characters indexed either by name or by Unicode group. Values are decimal representations of UTF-8 codes. The table is organized as a table of tables because the lua pairs keyword returns table data in an arbitrary order. Here, we want to process the table from top to bottom because the entries at the top of the table are also found in the ranges specified by the entries at the bottom of the table. This list contains patterns for templates like {{'}} which isn't an error but transcludes characters that are invisible. These kinds of patterns must be recognized by the functions that use this list. Also here is a pattern that recognizes stripmarkers that begin and end with the delete characters. The nowiki stripmarker is not an error but some others are because the parameter values that include them become part of the template's metadata before stripmarker replacement. ]] local invisible_chars = { {'replacement', '\239\191\189', '替换字符'}, -- U+FFFD, EF BF BD {'apostrophe', '&zwj;\226\128\138\039\226\128\139', '撇号'}, -- apostrophe template: &zwj; hair space ' zero-width space; not an error {'apostrophe', '\226\128\138\039\226\128\139', '撇号'}, -- apostrophe template: hair space ' zero-width space; (as of 2015-12-11) not an error {'zero width joiner', '\226\128\141', '零宽连字'}, -- U+200D, E2 80 8D {'zero width space', '\226\128\139', '零宽空格'}, -- U+200B, E2 80 8B {'hair space', '\226\128\138', '字间最小间隔'}, -- U+200A, E2 80 8A {'soft hyphen', '\194\173', '软连字符'}, -- U+00AD, C2 AD {'horizontal tab', '\009', '水平制表'}, -- U+0009 (HT), 09 {'line feed', '\010', '換行符'}, -- U+0010 (LF), 0A {'carriage return', '\013', '回车符'}, -- U+0013 (CR), 0D -- {'nowiki stripmarker', '\127UNIQ%-%-nowiki%-[%a%d]+%-QINU\127'}, -- nowiki stripmarker; not an error {'stripmarker', '\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127', 'mediawiki占位符'}, -- stripmarker; may or may not be an error; capture returns the stripmaker type {'delete', '\127', '删除符'}, -- U+007F (DEL), 7F; must be done after stripmarker test {'C0 control', '[\000-\008\011\012\014-\031]', 'C0控制符'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D)) {'C1 control', '[\194\128-\194\159]', 'C1控制符'}, -- U+0080–U+009F (XXX–APC), C2 80 – C2 9F {'Specials', '[\239\191\185-\239\191\191]', '特殊字符'}, -- U+FFF9-U+FFFF, EF BF B9 – EF BF BF {'Private use area', '[\238\128\128-\239\163\191]', '私用空间'}, -- U+E000–U+F8FF, EE 80 80 – EF A3 BF {'Supplementary Private Use Area-A', '[\243\176\128\128-\243\191\191\189]', '补充私用空间A'}, -- U+F0000–U+FFFFD, F3 B0 80 80 – F3 BF BF BD {'Supplementary Private Use Area-B', '[\244\128\128\128-\244\143\191\189]', '补充私用空间B'}, -- U+100000–U+10FFFD, F4 80 80 80 – F4 8F BF BD } --[[--------------------------< M A I N T E N A N C E _ C A T E G O R I E S >---------------------------------- Here we name maintenance categories to be used in maintenance messages. ]] local maint_cats = { ['ASIN'] = '引文格式1维护:ASIN使用ISBN', ['date_year'] = '引文格式1维护:日期与年', ['disp_auth_ed'] = '引文格式1维护:显示-作者', -- $1 is authors or editors ['embargo'] = '引文格式1维护:PMC封锁过期', ['english'] = 'CS1 maint: English language specified', ['etal'] = '引文格式1维护:显式使用等标签', ['extra_text'] = '引文格式1维护:冗余文本', ['ignore_isbn_err'] = '引文格式1维护:ISBN错误被忽略', ['jfm_format'] = '引文格式1维护:jfm格式', ['mr_format'] = '引文格式1维护:MR格式', ['pmc_format'] = '引文格式1维护:PMC格式', ['unknown_lang'] = '引文格式1维护:未识别语文类型', ['untitled'] = '引文格式1维护:无标题期刊', ['zbl_format'] = '引文格式1维护:zbl格式', } --[[--------------------------< P R O P E R T I E S _ C A T E G O R I E S >------------------------------------ Here we name properties categories ]] local prop_cats = { ['foreign_lang_source'] = 'CS1$1来源 ($2)', -- |language= categories; $1 is language name, $2 is ISO639-1 code ['script'] = 'CS1含有外文文本', -- when language specified by |script-title=xx: doesn't have its own category ['script_with_name'] = 'CS1含有$1文本 ($2)', -- |script-title=xx: has matching category; $1 is language name, $2 is ISO639-1 code } --[[--------------------------< T I T L E _ T Y P E S >-------------------------------------------------------- Here we map a template's CitationClass to TitleType (default values for |type= parameter) ]] local title_types = { ['AV-media-notes'] = 'Media notes', ['DVD-notes'] = 'Media notes', ['mailinglist'] = '邮件列表', ['map'] = 'Map', ['podcast'] = 'Podcast', ['pressrelease'] = '新闻稿', ['report'] = 'Report', ['techreport'] = 'Technical report', ['thesis'] = 'Thesis', } --[[--------------------------< E R R O R _ C O N D I T I O N S >---------------------------------------------- Error condition table The following contains a list of IDs for various error conditions defined in the code. For each ID, we specify a text message to display, an error category to include, and whether the error message should be wrapped as a hidden comment. Anchor changes require identical changes to matching anchor in Help:CS1 errors ]] local error_conditions = { accessdate_missing_url = { message = '使用<code style="'..code_style..'">&#124;accessdate=</code>需要含有<code style="'..code_style..'">&#124;url=</code>', anchor = 'accessdate_missing_url', category = '含有访问日期但无网址的引用的页面', hidden = true }, archive_missing_date = { message = '使用<code style="'..code_style..'">&#124;archiveurl=</code>需要含有<code style="'..code_style..'">&#124;archivedate=</code>', anchor = 'archive_missing_date', category = '含有存档网址错误的引用的页面', hidden = false }, archive_missing_url = { message = '使用<code style="'..code_style..'">&#124;archiveurl=</code>需要含有<code style="'..code_style..'">&#124;url=</code>', anchor = 'archive_missing_url', category = '含有存档网址错误的引用的页面', hidden = false }, arxiv_missing = { message = '需要使用<code style="'..code_style..'">&#124;arxiv=</code>', anchor = 'arxiv_missing', category = '引文格式1错误:arXiv', -- same as bad arxiv hidden = false }, arxiv_params_not_supported = { message = '不支持的参数使用了arXiv', anchor = 'arxiv_params_not_supported', category = '引文格式1错误:arXiv', -- same as bad arxiv hidden = false }, bad_arxiv = { message = '请检查<code style="'..code_style..'">&#124;arxiv=</code>值', anchor = 'bad_arxiv', category = '引文格式1错误:arXiv', hidden = false }, bad_asin = { message = '请检查<code style="'..code_style..'">&#124;asin=</code>值', anchor = 'bad_asin', category ='引文格式1错误:ASIN', hidden = false }, bad_bibcode = { message = '请检查<code style="'..code_style..'">&#124;bibcode=</code>值', anchor = 'bad_bibcode', category = '引文格式1错误:bibcode', hidden = false }, bad_biorxiv = { message = '请检查<code style="'..code_style..'">&#124;biorxiv=</code>值', anchor = 'bad_biorxiv', category = '引文格式1错误:bioRxiv', hidden = false }, bad_citeseerx = { message = '请检查<code style="'..code_style..'">&#124;citeseerx=</code>的值', anchor = 'bad_citeseerx', category = '引文格式1错误:citeseerx', hidden = false }, bad_cnid = { message = '请检查<code style="'..code_style..'">&#124;cn=</code>的值', anchor = 'bad_cnid', category = '引文格式1错误:CN', hidden = false }, bad_date = { message = '请检查<code style="'..code_style..'">$1</code>中的日期值', anchor = 'bad_date', category = '引文格式1错误:日期', hidden = true }, bad_doi = { message = '请检查<code style="'..code_style..'">&#124;doi=</code>值', anchor = 'bad_doi', category = '引文格式1错误:DOI', hidden = false }, bad_hdl = { message = '请检查<code style="'..code_style..'">&#124;hdl=</code>值', anchor = 'bad_hdl', category = '引文格式1错误:HDL', hidden = false }, bad_isbn = { message = '请检查<code style="'..code_style..'">&#124;isbn=</code>值', anchor = 'bad_isbn', category = '含有ISBN错误的引用的页面', hidden = false }, bad_ismn = { message = '请检查<code style="'..code_style..'">&#124;ismn=</code>值', anchor = 'bad_ismn', category = '引文格式1错误:ISMN', hidden = false }, bad_issn = { message = '请检查<code style="'..code_style..'">&#124;issn=</code>值', anchor = 'bad_issn', category = '引文格式1错误:ISSN', hidden = false }, bad_jfm = { message = '请检查<code style="'..code_style..'">&#124;jfm=</code>值', anchor = 'bad_jfm', category = '引文格式1错误:JFM', hidden = false }, bad_lccn = { message = '请检查<code style="'..code_style..'">&#124;lccn=</code>值', anchor = 'bad_lccn', category = '引文格式1错误:LCCN', hidden = false }, bad_message_id = { message = '请检查<code style="'..code_style..'">&#124;message-id=</code>值', anchor = 'bad_message_id', category = '引文格式1错误:message-id', hidden = false }, bad_mr = { message = '请检查<code style="'..code_style..'">&#124;mr=</code>值', anchor = 'bad_mr', category = '引文格式1错误:MR', hidden = false }, bad_oclc = { message = '请检查<code style="'..code_style..'">&#124;oclc=</code>值', anchor = 'bad_oclc', category = '引文格式1错误:OCLC', hidden = false }, bad_ol = { message = '请检查<code style="'..code_style..'">&#124;ol=</code>值', anchor = 'bad_ol', category = '引文格式1错误:OL', hidden = false }, bad_paramlink = { -- for |title-link=, |author/editor/translator-link=, |series-link=, |episode-link= message = '请检查<code style="'..code_style..'">&#124;$1=</code>值', anchor = 'bad_paramlink', category = '引文格式1错误:参数链接', hidden = false }, bad_pmc = { message = '请检查<code style="'..code_style..'">&#124;pmc=</code>值', anchor = 'bad_pmc', category = '引文格式1错误:PMC', hidden = false }, bad_pmid = { message = '请检查<code style="'..code_style..'">&#124;pmid=</code>值', anchor = 'bad_pmid', category = '引文格式1错误:PMID', hidden = false }, bad_s2cid = { message = '请检查<code style="'..code_style..'">&#124;s2cid=</code>的值', anchor = 'bad_s2cid', category = '引文格式1错误:S2CID', hidden = false }, bad_ssrn = { message = '请检查<code style="'..code_style..'">&#124;ssrn=</code>的值', anchor = 'bad_ssrn', category = '引文格式1错误:SSRN', hidden = false }, bad_url = { message = '请检查<code style="'..code_style..'">&#124;url=</code>值', anchor = 'bad_url', category = '含有网址格式错误的引用的页面', hidden = false }, bare_url_missing_title = { message = '$1缺少标题', anchor = 'bare_url_missing_title', category = '含有裸露网址的引用的页面', hidden = false }, bad_zbl = { message = '请检查<code style="'..code_style..'">&#124;zbl=</code>的值', anchor = 'bad_zbl', category = '引文格式1错误:ZBL', hidden = false }, bad_csbn = { message = '请检查<code style="'..code_style..'">&#124;csbn=</code>或<code style="'..code_style..'">&#124;unified=</code>的值', anchor = 'bad_csbn', category = '引文格式1错误:CSBN', hidden = false }, class_ignored = { message = '<code style="'..code_style..'">&#124;class=</code>被忽略', anchor = 'class_ignored', category = '引文格式1错误:class参数被忽略', hidden = false }, chapter_ignored = { message = '<code style="'..code_style..'">&#124;$1=</code>被忽略', anchor = 'chapter_ignored', category = '引文格式1错误:章节参数被忽略', hidden = false }, citation_missing_title = { message = '缺少或<code style="'..code_style..'">&#124;title=</code>为空', anchor = 'citation_missing_title', category = '含有缺少标题的引用的页面', hidden = false }, cite_web_url = { -- this error applies to cite web and to cite podcast message = '缺少或<code style="'..code_style..'">&#124;url=</code>为空', anchor = 'cite_web_url', category = '含有缺少网址的网站引用的页面', hidden = true }, coauthors_missing_author = { message = '使用<code style="'..code_style..'">&#124;coauthors=</code>需要含有<code style="'..code_style..'">&#124;author=</code>', anchor = 'coauthors_missing_author', category = '引文格式1错误:无主作者的合作者', hidden = false }, contributor_ignored = { message = '<code style="'..code_style..'">&#124;contributor=</code>被忽略</code>', anchor = 'contributor_ignored', category = '引文格式1错误:合作者', hidden = false }, contributor_missing_required_param = { message = '使用<code style="'..code_style..'">&#124;contributor=</code>需要含有<code style="'..code_style..'">&#124;$1=</code>', anchor = 'contributor_missing_required_param', category = '引文格式1错误:合作者', hidden = false }, deprecated_params = { message = '引文使用过时参数$1', anchor = 'deprecated_params', category = '含有过时参数的引用的页面', hidden = true }, empty_citation = { message = '空引用', anchor = 'empty_citation', category = '含有空引用的页面', hidden = false }, first_missing_last = { message = '$1列表中的<code style="'..code_style..'">&#124;first$2=</code>缺少<code style="'..code_style..'">&#124;last$2=</code>', anchor = 'first_missing_last', category = '引文格式1错误:缺少作者或编者', hidden = false }, format_missing_url = { message = '使用<code style="'..code_style..'">&#124;format=</code>需要含有<code style="'..code_style..'">&#124;url=</code>', anchor = 'format_missing_url', category = '含有格式却不含网址的引用的页面', hidden = true }, implict_etal_editor = { message = '建议使用<code style="'..code_style..'">&#124;displayeditors=</code>', anchor = 'displayeditors', category = '含有旧式缩略标签的引用的页面 in editors', hidden = true }, invalid_param_val = { message = '无效<code style="'..code_style..'">&#124;$1=$2</code>', anchor = 'invalid_param_val', category = '引文格式1错误:无效参数值', hidden = false }, invisible_char = { message = '参数$2值左起第$3位存在$1', anchor = 'invisible_char', category = '引文格式1错误:不可见字符', hidden = false }, missing_name = { message = '$1列表缺少<code style="'..code_style..'">&#124;last$2=</code>', anchor = 'missing_name', category = '引文格式1错误:缺少作者或编者', hidden = false }, param_access_requires_param = { message = '使用<code style="'..code_style..'">&#124;$1-access=</code>需要含有<code style="'..code_style..'">&#124;$1=</code>', anchor = 'param_access_requires_param', category = '含有-access参数但无主参数的引用的页面', hidden = true }, param_has_ext_link = { message = '外部链接存在于<code style="'..code_style..'">$1</code>', anchor = 'param_has_ext_link', category = '引文格式1错误:外部链接', hidden = false }, parameter_ignored = { message = '已忽略未知参数<code style="'..code_style..'">&#124;$1=</code>', anchor = 'parameter_ignored', category = '含有未知参数的引用的页面', hidden = false }, parameter_ignored_suggest = { message = '已忽略未知参数<code style="'..code_style..'">&#124;$1=</code>(建议使用<code style="'..code_style..'">&#124;$2=</code>)', anchor = 'parameter_ignored_suggest', category = '含有未知参数的引用的页面', hidden = false }, redundant_parameters = { message = '$1只需其一', anchor = 'redundant_parameters', category = '含有冗余参数的引用的页面', hidden = false }, text_ignored = { message = '已忽略文本“$1”', anchor = 'text_ignored', category = '含有未命名参数的引用的页面', hidden = false }, trans_missing_title = { message = '使用<code style="'..code_style..'">&#124;trans-title=</code>需要含有<code style="'..code_style..'">&#124;title=</code>', anchor = 'trans_missing_title', category = '引文格式1错误:翻译标题', hidden = false }, vancouver = { message = '温哥华格式错误', anchor = 'vancouver', category = '引文格式1错误:温哥华格式', hidden = false }, wikilink_in_url = { message = '网址-维基内链冲突', anchor = 'wikilink_in_url', category = '引文格式1错误:网址-维基内链冲突', hidden = false }, } --[[--------------------------< I D _ H A N D L E R S >-------------------------------------------------------- The following contains a list of values for various defined identifiers. For each identifier we specify a variety of information necessary to properly render the identifier in the citation. parameters: a list of parameter aliases for this identifier link: Wikipedia article name label: the alternate name to apply to link mode: 'manual' when there is a specific function in the code to handle the identifier; 'external' for identifiers that link outside of Wikipedia; prefix: the first part of a url that will be concatenated with a second part which usually contains the identifier encode: true if uri should be percent encoded; otherwise false COinS: identifier link or keyword for use in COinS: for identifiers registered at info-uri.info use: info:.... for identifiers that have COinS keywords, use the keyword: rft.isbn, rft.issn, rft.eissn for others make a url using the value in prefix, use the keyword: pre (not checked; any text other than 'info' or 'rft' works here) set to nil to leave the identifier out of the COinS separator: character or text between label and the identifier in the rendered citation ]] local id_handlers = { ['ARXIV'] = { parameters = {'arxiv', 'ARXIV', 'eprint'}, link = 'arXiv', label = 'arXiv', mode = 'manual', prefix = '//arxiv.org/abs/', -- protocol relative tested 2013-09-04 encode = false, COinS = 'info:arxiv', separator = ':', access = 'free', }, ['ASIN'] = { parameters = { 'asin', 'ASIN' }, link = '亚马逊标准识别码', label = 'ASIN', mode = 'manual', prefix = '//www.amazon.', COinS = nil, -- no COinS for this id (needs thinking on implementation because |asin-tld=) separator = '&nbsp;', encode = false; }, ['BIBCODE'] = { parameters = {'bibcode', 'BIBCODE'}, link = 'Bibcode', label = 'Bibcode', mode = 'manual', prefix = 'https://ui.adsabs.harvard.edu/abs/', encode = false, COinS = 'info:bibcode', custom_access = 'bibcode-access', separator = ':', }, ['BIORXIV'] = { parameters = {'biorxiv'}, link = 'bioRxiv', label = 'bioRxiv', mode = 'manual', prefix = '//doi.org/', encode = true, COinS = 'pre', separator = '&nbsp;', access = 'free', }, ['CITESEERX'] = { parameters = {'citeseerx'}, link = 'CiteSeerX', q = 'Q2715061', label = 'CiteSeerX', mode = 'manual', prefix = '//citeseerx.ist.psu.edu/viewdoc/summary?doi=', COinS = 'pre', -- use prefix value access = 'free', -- free to read encode = true, separator = '&nbsp;', }, ['CNID'] = { parameters = {'cn', 'CN'}, link = '国内统一刊号', label = "CN", mode = 'manual', prefix = 'http://www.nppa.gov.cn/nppa/publishing/view.shtml?&pubCode=', encode = true, separator = ' ', }, ['DOI'] = { parameters = { 'doi', 'DOI' }, link = '數位物件識別號', q = 'Q25670', label = 'doi', mode = 'manual', prefix = '//dx.doi.org/', COinS = 'info:doi', custom_access = 'doi-access', separator = ':', encode = true, }, ['EISSN'] = { parameters = {'eissn', 'EISSN'}, link = 'International_Standard_Serial_Number#Electronic_ISSN', label = 'eISSN', mode = 'manual', prefix = '//www.worldcat.org/issn/', COinS = 'rft.eissn', encode = false, separator = '&nbsp;', }, ['HDL'] = { parameters = { 'hdl', 'HDL' }, link = 'Handle System', q = 'Q3126718', label = 'hdl', mode = 'manual', prefix = '//hdl.handle.net/', COinS = 'info:hdl', custom_access = 'hdl-access', separator = ':', encode = true, }, ['ISBN'] = { parameters = {'isbn', 'ISBN', 'isbn13', 'ISBN13'}, link = '国际标准书号', label = 'ISBN', mode = 'manual', prefix = 'Special:BookSources/', COinS = 'rft.isbn', separator = '&nbsp;', }, ['ISMN'] = { parameters = {'ismn', 'ISMN'}, link = 'International Standard Music Number', label = 'ISMN', mode = 'manual', prefix = '', -- not currently used; COinS = 'nil', -- nil because we can't use pre or rft or info: separator = '&nbsp;', }, ['ISSN'] = { parameters = {'issn', 'ISSN'}, link = '国际标准连续出版物号', label = 'ISSN', mode = 'manual', prefix = '//www.worldcat.org/issn/', COinS = 'rft.issn', encode = false, separator = '&nbsp;', }, ['JFM'] = { parameters = {'jfm', 'JFM'}, link = 'Jahrbuch über die Fortschritte der Mathematik', label = 'JFM', mode = 'manual', prefix = '//zbmath.org/?format=complete&q=an:', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, ['JSTOR'] = { parameters = {'jstor', 'JSTOR'}, link = 'JSTOR', label = 'JSTOR', mode = 'external', prefix = '//www.jstor.org/stable/', -- protocol relative tested 2013-09-04 COinS = 'pre', -- use prefix value custom_access = 'jstor-access', encode = false, separator = '&nbsp;', }, ['LCCN'] = { parameters = {'LCCN', 'lccn'}, link = '美国国会图书馆控制码', label = 'LCCN', mode = 'manual', prefix = 'http://lccn.loc.gov/', COinS = 'info:lccn', -- use prefix value encode = false, separator = '&nbsp;', }, ['MR'] = { parameters = {'MR', 'mr'}, link = '數學評論', label = 'MR', mode = 'manual', prefix = '//www.ams.org/mathscinet-getitem?mr=', -- protocol relative tested 2013-09-04 COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, ['OCLC'] = { parameters = {'OCLC', 'oclc'}, link = 'OCLC', label = 'OCLC', mode = 'manual', prefix = '//www.worldcat.org/oclc/', COinS = 'info:oclcnum', encode = true, separator = '&nbsp;', }, ['OL'] = { parameters = { 'ol', 'OL' }, link = '开放图书馆', label = 'OL', mode = 'manual', prefix = '//openlibrary.org/', COinS = nil, -- no COinS for this id (needs thinking on implementation because /authors/books/works/OL) custom_access = 'ol-access', separator = '&nbsp;', endode = true, }, ['OSTI'] = { parameters = {'OSTI', 'osti'}, link = '科学和技术信息办公室', label = 'OSTI', mode = 'external', prefix = '//www.osti.gov/energycitations/product.biblio.jsp?osti_id=', -- protocol relative tested 2013-09-04 COinS = 'pre', -- use prefix value custom_access = 'osti-access', encode = true, separator = '&nbsp;', }, ['PMC'] = { parameters = {'PMC', 'pmc'}, link = '公共医学中心', label = 'PMC', mode = 'manual', prefix = '//www.ncbi.nlm.nih.gov/pmc/articles/PMC', suffix = " ", COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', access = 'free', }, ['PMID'] = { parameters = {'PMID', 'pmid'}, link = '公共医学识别码', label = 'PMID', mode = 'manual', prefix = '//www.ncbi.nlm.nih.gov/pubmed/', COinS = 'info:pmid', encode = false, separator = '&nbsp;', }, ['RFC'] = { parameters = {'RFC', 'rfc'}, link = '徵求修正意見書', label = 'RFC', mode = 'external', prefix = '//tools.ietf.org/html/rfc', COinS = 'pre', -- use prefix value encode = false, separator = '&nbsp;', access = 'free', }, ['S2CID'] = { parameters = {'s2cid', 'S2CID'}, link = 'Semantic Scholar', -- l10n: Not created yet label = 'S2CID', mode = 'manual', prefix = 'https://api.semanticscholar.org/CorpusID:', COinS = 'pre', -- use prefix value custom_access = 's2cid-access', encode = false, separator = '&nbsp;', }, ['SSRN'] = { parameters = {'SSRN', 'ssrn'}, link = '社会科学研究网络', label = 'SSRN', mode = 'manual', prefix = '//ssrn.com/abstract=', -- protocol relative tested 2013-09-04 COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', access = 'free', }, ['USENETID'] = { parameters = {'message-id'}, link = 'Usenet', label = 'Usenet:', mode = 'manual', prefix = 'news:', encode = false, COinS = 'pre', -- use prefix value separator = '&nbsp;', }, ['ZBL'] = { parameters = {'ZBL', 'zbl'}, link = 'Zentralblatt MATH', label = 'Zbl', mode = 'manual', prefix = '//zbmath.org/?format=complete&q=an:', COinS = 'pre', -- use prefix value encode = true, separator = '&nbsp;', }, -- LOCAL ['CSBN'] = { parameters = {'unified', 'csbn', 'CSBN'}, link = '统一书号', label = 'CSBN', mode = 'manual', prefix = 'http://book.douban.com/subject_search?search_text=SH', COinS = 'rft.csbn', encode = true, separator = '&nbsp;', }, -- END LOCAL } return { aliases = aliases, defaults = defaults, error_conditions = error_conditions, id_handlers = id_handlers, keywords = keywords, invisible_chars = invisible_chars, maint_cats = maint_cats, messages = messages, presentation = presentation, prop_cats = prop_cats, title_types = title_types, uncategorized_namespaces = uncategorized_namespaces, uncategorized_subpages = uncategorized_subpages, templates_using_volume = templates_using_volume, templates_using_issue = templates_using_issue, templates_not_using_page = templates_not_using_page, } d51f0aed63f5b7bbbf0b11d63ee06572146ae56a Module:Citation/CS1/Whitelist 828 23 35 2022-09-24T01:21:08Z Richard Robin 2 创建页面,内容为“ --[[--------------------------< P A R A M E T E R S N O T S U P P O R T E D >------------------------------ This is a list of parameters that once were but now are no longer supported: ['albumlink'] = nil, -- unique alias of titlelink used by old cite AV media notes ['albumtype'] = nil, -- controled inappropriate functionality in the old cite AV media notes ['artist'] = nil, -- unique alias of others used by old cite AV media notes ['Author']…” Scribunto text/plain --[[--------------------------< P A R A M E T E R S N O T S U P P O R T E D >------------------------------ This is a list of parameters that once were but now are no longer supported: ['albumlink'] = nil, -- unique alias of titlelink used by old cite AV media notes ['albumtype'] = nil, -- controled inappropriate functionality in the old cite AV media notes ['artist'] = nil, -- unique alias of others used by old cite AV media notes ['Author'] = nil, -- non-standard capitalization ['authorformat'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['author-format'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['author-name-separator'] = nil,-- primarily used to support Vancouver format which functionality now part of name-list-format ['author-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['began'] = nil, -- module handles date ranges; cite episode and cite series ['chapterlink'] = nil, -- if ever necessary to link to a chapter article, |chapter= can be wikilinked ['chapter-link'] = nil, -- ['cointerviewers'] = nil, -- unique alias of others used by old cite interview ['day'] = nil, -- deprecated in {{citation/core}} and somehow undeprecated in Module:Citation/CS1 and now finally removed ['director'] = nil, -- unique alias of author used by old cite DVD-notes ['DoiBroken'] = nil, -- not used, non-standard captialization ['Editor'] = nil, -- non-standard capitalization ['editorformat'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['EditorSurname'] = nil, -- non-standard capitalization ['editor-format'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['EditorGiven'] = nil, -- non-standard capitalization ['editor-name-separator'] = nil,-- primarily used to support Vancouver format which functionality now part of name-list-format ['editor-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['Embargo'] = nil, -- not used, non-standard capitalization ['ended'] = nil, -- module handles date ranges; cite episode and cite series ['month'] = nil, -- functionality supported by |date= ['name-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format ['notestitle'] = nil, -- unique alias of chapter used by old cite AV media notes ['PPrefix'] = nil, -- non-standard capitalization ['PPPrefix'] = nil, -- not used, non-standard capitalization ['pp-prefix'] = nil, -- not used, not documented ['p-prefix'] = nil, -- not used, not documented ['publisherid'] = nil, -- unique alias of id used by old cite AV media notes and old cite DVD-notes ['Ref'] = nil, -- non-statndard capitalization ['separator'] = nil, -- this functionality now provided by |mode= ['titleyear'] = nil, -- unique alias of origyear used by old cite DVD-notes ['Author#'] = nil, -- non-standard capitalization ['authors#'] = nil, -- no need for multiple lists of author names ['Editor#'] = nil, -- non-standard capitalization ['editors#'] = nil, -- no need for multiple lists of editor names ['EditorGiven#'] = nil, -- non-standard capitalization ['EditorSurname#'] = nil, -- non-standard capitalization ]] --[[--------------------------< S U P P O R T E D P A R A M E T E R S >-------------------------------------- Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values: true - these parameters are valid and supported parameters false - these parameters are deprecated but still supported nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter) ]] local whitelist = {} local basic_arguments = { ['accessdate'] = true, ['access-date'] = true, ['agency'] = true, ['airdate'] = true, ['air-date'] = true, ['archivedate'] = true, ['archive-date'] = true, ['archive-format'] = true, ['archiveurl'] = true, ['archive-url'] = true, ['article'] = true, ['arxiv'] = true, ['ARXIV'] = true, ['asin'] = true, ['ASIN'] = true, ['asin-tld'] = true, ['ASIN-TLD'] = true, ['at'] = true, ['author'] = true, ['author-first'] = true, ['author-last'] = true, ['authorlink'] = true, ['author-link'] = true, ['authormask'] = true, ['author-mask'] = true, ['authors'] = true, ['bibcode'] = true, ['BIBCODE'] = true, ['bibcode-access'] = true, ['biorxiv'] = true, ['booktitle'] = true, ['book-title'] = true, ['callsign'] = true, -- cite interview ['call-sign'] = true, -- cite interview ['cartography'] = true, ['chapter'] = true, ['chapter-format'] = true, ['chapterurl'] = true, ['chapter-url'] = true, ['citeseerx'] = true, ['city'] = true, -- cite interview, cite episode, cite serial ['class'] = true, -- cite arxiv and arxiv identifiers ['cn'] = true, ['CN'] = true, ['coauthor'] = false, -- deprecated ['coauthors'] = false, -- deprecated ['conference'] = true, ['conference-format'] = true, ['conferenceurl'] = true, ['conference-url'] = true, ['contribution'] = true, ['contribution-format'] = true, ['contributionurl'] = true, ['contribution-url'] = true, ['contributor'] = true, ['contributor-first'] = true, ['contributor-last'] = true, ['contributor-link'] = true, ['contributor-mask'] = true, ['credits'] = true, -- cite episode, cite serial ['date'] = true, ['deadurl'] = true, ['dead-url'] = true, ['degree'] = true, ['department'] = true, ['dictionary'] = true, ['displayauthors'] = true, ['display-authors'] = true, ['displayeditors'] = true, ['display-editors'] = true, ['docket'] = true, ['doi'] = true, ['DOI'] = true, ['doi-access'] = true, ['doi-broken'] = true, ['doi_brokendate'] = true, ['doi-broken-date'] = true, ['doi_inactivedate'] = true, ['doi-inactive-date'] = true, ['edition'] = true, ['editor'] = true, ['editor-first'] = true, ['editor-given'] = true, ['editor-last'] = true, ['editorlink'] = true, ['editor-link'] = true, ['editormask'] = true, ['editor-mask'] = true, ['editors'] = true, ['editor-surname'] = true, ['eissn'] = true, ['EISSN'] = true, ['embargo'] = true, ['encyclopaedia'] = true, ['encyclopedia'] = true, ['entry'] = true, ['episode'] = true, -- cite serial only TODO: make available to cite episode? ['episodelink'] = true, -- cite episode and cite serial ['episode-link'] = true, -- cite episode and cite serial ['eprint'] = true, -- cite arxiv and arxiv identifiers ['event'] = true, ['event-format'] = true, ['eventurl'] = true, ['event-url'] = true, ['first'] = true, ['format'] = true, ['given'] = true, ['hdl'] = true, ['HDL'] = true, ['hdl-access'] = true, ['host'] = true, ['id'] = true, ['ID'] = true, ['ignoreisbnerror'] = true, ['ignore-isbn-error'] = true, ['in'] = true, ['inset'] = true, ['institution'] = true, ['interviewer'] = true, --cite interview ['interviewers'] = true, --cite interview ['isbn'] = true, ['ISBN'] = true, ['isbn13'] = true, ['ISBN13'] = true, ['ismn'] = true, ['ISMN'] = true, ['issn'] = true, ['ISSN'] = true, ['issue'] = true, ['jfm'] = true, ['JFM'] = true, ['journal'] = true, ['jstor'] = true, ['JSTOR'] = true, ['jstor-access'] = true, ['language'] = true, ['last'] = true, ['lastauthoramp'] = true, ['last-author-amp'] = true, ['laydate'] = true, ['lay-date'] = true, ['laysource'] = true, ['lay-source'] = true, ['laysummary'] = true, ['lay-summary'] = true, ['lay-format'] = true, ['layurl'] = true, ['lay-url'] = true, ['lccn'] = true, ['LCCN'] = true, ['location'] = true, ['magazine'] = true, ['mailinglist'] = true, -- cite mailing list only ['mailing-list'] = true, -- cite mailing list only ['map'] = true, -- cite map only ['map-format'] = true, -- cite map only ['mapurl'] = true, -- cite map only ['map-url'] = true, -- cite map only ['medium'] = true, ['message-id'] = true, -- cite newsgroup ['minutes'] = true, ['mode'] = true, ['mr'] = true, ['MR'] = true, ['name-list-format'] = true, ['network'] = true, ['newsgroup'] = true, ['newspaper'] = true, ['nocat'] = true, ['no-cat'] = true, ['nopp'] = true, ['no-pp'] = true, ['notracking'] = true, ['no-tracking'] = true, ['number'] = true, ['oclc'] = true, ['OCLC'] = true, ['ol'] = true, ['OL'] = true, ['ol-access'] = true, ['origyear'] = true, ['orig-year'] = true, ['osti'] = true, ['OSTI'] = true, ['osti-access'] = true, ['others'] = true, ['p'] = true, ['page'] = true, ['pages'] = true, ['people'] = true, ['periodical'] = true, ['place'] = true, ['pmc'] = true, ['PMC'] = true, ['pmid'] = true, ['PMID'] = true, ['postscript'] = true, ['pp'] = true, ['program'] = true, -- cite interview ['publicationdate'] = true, ['publication-date'] = true, ['publicationplace'] = true, ['publication-place'] = true, ['publisher'] = true, ['quotation'] = true, ['quote'] = true, ['ref'] = true, ['registration'] = true, ['rfc'] = true, ['RFC'] = true, ['s2cid'] = true, ['s2cid-access'] = true, ['scale'] = true, ['script-chapter'] = true, ['script-title'] = true, ['season'] = true, ['section'] = true, ['section-format'] = true, ['sections'] = true, -- cite map only ['sectionurl'] = true, ['section-url'] = true, ['series'] = true, ['serieslink'] = true, ['series-link'] = true, ['seriesno'] = true, ['series-no'] = true, ['seriesnumber'] = true, ['series-number'] = true, ['series-separator'] = true, ['sheet'] = true, -- cite map only ['sheets'] = true, -- cite map only ['ssrn'] = true, ['SSRN'] = true, ['station'] = true, ['subject'] = true, ['subjectlink'] = true, ['subject-link'] = true, ['subscription'] = true, ['surname'] = true, ['template doc demo'] = true, ['template-doc-demo'] = true, ['time'] = true, ['timecaption'] = true, ['time-caption'] = true, ['title'] = true, ['titlelink'] = true, ['title-link'] = true, ['title_zh'] = true, ['trans_chapter'] = true, ['trans-chapter'] = true, ['trans-map'] = true, ['transcript'] = true, ['transcript-format'] = true, ['transcripturl'] = true, ['transcript-url'] = true, ['trans_title'] = true, ['trans-title'] = true, ['translator'] = true, ['translator-first'] = true, ['translator-last'] = true, ['translator-link'] = true, ['translator-mask'] = true, ['type'] = true, ['url'] = true, ['URL'] = true, ['urlstatus'] = true, ['url-status'] = true, ['vauthors'] = true, ['veditors'] = true, ['version'] = true, ['via'] = true, ['volume'] = true, ['website'] = true, ['work'] = true, ['year'] = true, ['zbl'] = true, ['ZBL'] = true, ['unified'] = true, ['csbn'] = true, ['CSBN'] = true, } local numbered_arguments = { ['author#'] = true, ['author-first#'] = true, ['author#-first'] = true, ['author-last#'] = true, ['author#-last'] = true, ['author-link#'] = true, ['author#link'] = true, ['author#-link'] = true, ['authorlink#'] = true, ['author-mask#'] = true, ['author#mask'] = true, ['author#-mask'] = true, ['authormask#'] = true, ['contributor#'] = true, ['contributor-first#'] = true, ['contributor#-first'] = true, ['contributor-last#'] = true, ['contributor#-last'] = true, ['contributor-link#'] = true, ['contributor#-link'] = true, ['contributor-mask#'] = true, ['contributor#-mask'] = true, ['editor#'] = true, ['editor-first#'] = true, ['editor#-first'] = true, ['editor#-given'] = true, ['editor-given#'] = true, ['editor-last#'] = true, ['editor#-last'] = true, ['editor-link#'] = true, ['editor#link'] = true, ['editor#-link'] = true, ['editorlink#'] = true, ['editor-mask#'] = true, ['editor#mask'] = true, ['editor#-mask'] = true, ['editormask#'] = true, ['editor#-surname'] = true, ['editor-surname#'] = true, ['first#'] = true, ['given#'] = true, ['last#'] = true, ['subject#'] = true, ['subject-link#'] = true, ['subject#link'] = true, ['subject#-link'] = true, ['subjectlink#'] = true, ['surname#'] = true, ['translator#'] = true, ['translator-first#'] = true, ['translator#-first'] = true, ['translator-last#'] = true, ['translator#-last'] = true, ['translator-link#'] = true, ['translator#-link'] = true, ['translator-mask#'] = true, ['translator#-mask'] = true, } return {basic_arguments = basic_arguments, numbered_arguments = numbered_arguments}; 871a2ce0b4f114b92578d3a6778b475ef0d2ccc5 Module:Citation/CS1/Date validation 828 24 36 2022-09-24T01:21:49Z Richard Robin 2 创建页面,内容为“local p = {} --[[--------------------------< I S _ V A L I D _ D A T E _ F R O M _ A _ P O I N T >------------------------- 将日期验证的逻辑拆分出来,供其它模块使用 ]] local function is_valid_date_from_a_point (date, point_ts) local lang = mw.getContentLanguage(); local good1, good2; local access_ts, tomorrow_ts; -- to hold unix time stamps representing the dates good1, access_ts = pcall( lang.formatDate, lang, 'U', date );…” Scribunto text/plain local p = {} --[[--------------------------< I S _ V A L I D _ D A T E _ F R O M _ A _ P O I N T >------------------------- 将日期验证的逻辑拆分出来,供其它模块使用 ]] local function is_valid_date_from_a_point (date, point_ts) local lang = mw.getContentLanguage(); local good1, good2; local access_ts, tomorrow_ts; -- to hold unix time stamps representing the dates good1, access_ts = pcall( lang.formatDate, lang, 'U', date ); -- convert date value to unix timesatmp good2, tomorrow_ts = pcall( lang.formatDate, lang, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow if good1 and good2 then access_ts = tonumber (access_ts); -- convert to numbers for the comparison tomorrow_ts = tonumber (tomorrow_ts); else return false; -- one or both failed to convert to unix time stamp end if point_ts <= access_ts and access_ts < tomorrow_ts then -- the point <= date < tomorrow's date return true; else return false; -- date out of range end end --[[--------------------------< I S _ V A L I D _ A C C E S S D A T E >---------------------------------------- returns true if: Wikipedia start date <= accessdate < today + 2 days Wikipedia start date is 2001-01-15T00:00:00 UTC which is 979516800 seconds after 1970-01-01T00:00:00 UTC (the start of Unix time) accessdate is the date provided in |accessdate= at time 00:00:00 UTC today is the current date at time 00:00:00 UTC plus 48 hours if today is 2015-01-01T00:00:00 then adding 24 hours gives 2015-01-02T00:00:00 – one second more than today adding 24 hours gives 2015-01-03T00:00:00 – one second more than tomorrow ]] local function is_valid_accessdate (accessdate) accessdate = accessdate:gsub("年", "-"); accessdate = accessdate:gsub("月", "-"); accessdate = accessdate:gsub("日", "-"); accessdate = accessdate:gsub("-$", ""); return is_valid_date_from_a_point (accessdate, 979516800); end --[[--------------------------< G E T _ M O N T H _ N U M B E R >---------------------------------------------- returns a number according to the month in a date: 1 for January, etc. Capitalization and spelling must be correct. If not a valid month, returns 0 ]] local function get_month_number (month) local long_months = {['January']=1, ['February']=2, ['March']=3, ['April']=4, ['May']=5, ['June']=6, ['July']=7, ['August']=8, ['September']=9, ['October']=10, ['November']=11, ['December']=12}; local short_months = {['Jan']=1, ['Feb']=2, ['Mar']=3, ['Apr']=4, ['May']=5, ['Jun']=6, ['Jul']=7, ['Aug']=8, ['Sep']=9, ['Oct']=10, ['Nov']=11, ['Dec']=12}; local zh_months = {['1月']=1, ['2月']=2, ['3月']=3, ['4月']=4, ['5月']=5, ['6月']=6, ['7月']=7, ['8月']=8, ['9月']=9, ['10月']=10, ['11月']=11, ['12月']=12}; -- LOCAL local temp; temp=long_months[month]; if temp then return temp; end -- if month is the long-form name temp=short_months[month]; if temp then return temp; end -- if month is the short-form name temp=zh_months[month]; -- LOCAL if temp then return temp; end -- if month is in Chinese -- LOCAL return 0; -- misspelled, improper case, or not a month name end --[[--------------------------< G E T _ S E A S O N _ N U M B E R >-------------------------------------------- returns a number according to the sequence of seasons in a year: 1 for Winter, etc. Capitalization and spelling must be correct. If not a valid season, returns 0 ]] local function get_season_number (season) local season_list = {['Winter']=21, ['Spring']=22, ['Summer']=23, ['Fall']=24, ['Autumn']=24}; -- make sure these numbers do not overlap month numbers local temp; temp=season_list[season]; if temp then return temp; end -- if season is a valid name return its number return 0; -- misspelled, improper case, or not a season name end --[[--------------------------< I S _ P R O P E R _ N A M E >-------------------------------------------------- returns a non-zero number if date contains a recognized proper name. Capitalization and spelling must be correct. ]] local function is_proper_name (name) local name_list = {['Christmas']=31} local temp; temp=name_list[name]; if temp then return temp; end -- if name is a valid name return its number return 0; -- misspelled, improper case, or not a proper name end --[[--------------------------< I S _ V A L I D _ M O N T H _ O R _ S E A S O N >------------------------------ --returns true if month or season is valid (properly spelled, capitalized, abbreviated) ]] local function is_valid_month_or_season (month_season) if 0 == get_month_number (month_season) then -- if month text isn't one of the twelve months, might be a season if 0 == get_season_number (month_season) then -- not a month, is it a season? return false; -- return false not a month or one of the five seasons end end return true; end --[[--------------------------< I S _ V A L I D _ Y E A R >---------------------------------------------------- Function gets current year from the server and compares it to year from a citation parameter. Years more than one year in the future are not acceptable. ]] local function is_valid_year(year) if not is_set(year_limit) then year_limit = tonumber(os.date("%Y"))+1; -- global variable so we only have to fetch it once end return tonumber(year) <= year_limit; -- false if year is in the future more than one year end --[[--------------------------< I S _ V A L I D _ D A T E >---------------------------------------------------- Returns true if day is less than or equal to the number of days in month and year is no farther into the future than next year; else returns false. Assumes Julian calendar prior to year 1582 and Gregorian calendar thereafter. Accounts for Julian calendar leap years before 1582 and Gregorian leap years after 1582. Where the two calendars overlap (1582 to approximately 1923) dates are assumed to be Gregorian. ]] local function is_valid_date (year, month, day) local days_in_month = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; local month_length; if not is_valid_year(year) then -- no farther into the future than next year return false; end month = tonumber(month); -- required for YYYY-MM-DD dates if (2==month) then -- if February month_length = 28; -- then 28 days unless if 1582 > tonumber(year) then -- Julian calendar if 0==(year%4) then month_length = 29; end else -- Gregorian calendar if (0==(year%4) and (0~=(year%100) or 0==(year%400))) then -- is a leap year? month_length = 29; -- if leap year then 29 days in February end end else month_length=days_in_month[month]; end if tonumber (day) > month_length then return false; end return true; end --[[--------------------------< I S _ V A L I D _ M O N T H _ R A N G E _ S T Y L E >-------------------------- Months in a range are expected to have the same style: Jan–Mar or October–December but not February–Mar or Jul–August. There is a special test for May because it can be either short or long form. Returns true when style for both months is the same ]] local function is_valid_month_range_style (month1, month2) local len1 = month1:len(); local len2 = month2:len(); if len1 == len2 then return true; -- both months are short form so return true elseif 'May' == month1 or 'May'== month2 then return true; -- both months are long form so return true elseif 3 == len1 or 3 == len2 then return false; -- months are mixed form so return false else return true; -- both months are long form so return true end end --[[--------------------------< I S _ V A L I D _ M O N T H _ S E A S O N _ R A N G E >------------------------ Check a pair of months or seasons to see if both are valid members of a month or season pair. Month pairs are expected to be left to right, earliest to latest in time. Similarly, seasons are also left to right, earliest to latest in time. There is an oddity with seasons: winter is assigned a value of 1, spring 2, ..., fall and autumn 4. Because winter can follow fall/autumn at the end of a calender year, a special test is made to see if |date=Fall-Winter yyyy (4-1) is the date. ]] local function is_valid_month_season_range(range_start, range_end) local range_start_number = get_month_number (range_start); if 0 == range_start_number then -- is this a month range? local range_start_number = get_season_number (range_start); -- not a month; is it a season? get start season number local range_end_number = get_season_number (range_end); -- get end season number if 0 ~= range_start_number then -- is start of range a season? if range_start_number < range_end_number then -- range_start is a season return true; -- return true when range_end is also a season and follows start season; else false end if 24 == range_start_number and 21 == range_end_number then -- special case when season range is Fall-Winter or Autumn-Winter return true; end end return false; -- range_start is not a month or a season; or range_start is a season and range_end is not; or improper season sequence end local range_end_number = get_month_number (range_end); -- get end month number if range_start_number < range_end_number then -- range_start is a month; does range_start precede range_end? if is_valid_month_range_style (range_start, range_end) then -- do months have the same style? return true; -- proper order and same style end end return false; -- range_start month number is greater than or equal to range end number; or range end isn't a month end --[[--------------------------< M A K E _ C O I N S _ D A T E >------------------------------------------------ This function receives a table of date parts for one or two dates and an empty table reference declared in Module:Citation/CS1. The function is called only for |date= parameters and only if the |date=<value> is determined to be a valid date format. The question of what to do with invalid date formats is not answered here. The date parts in the input table are converted to an ISO 8601 conforming date string: single whole dates: yyyy-mm-dd month and year dates: yyyy-mm year dates: yyyy ranges: yyyy-mm-dd/yyyy-mm-dd yyyy-mm/yyyy-mm yyyy/yyyy Dates in the Julian calendar are reduced to year or year/year so that we don't have to do calendar conversion from Julian to Proleptic Gregorian. The input table has: year, year2 – always present; if before 1582, ignore months and days if present month, month2 – 0 if not provided, 1-12 for months, 21-24 for seasons; 31– proper name dates day, day2 – 0 if not provided, 1-31 for days the output table receives: rftdate: an IS8601 formatted date rftchron: a free-form version of the date, usually without year which is in rftdate (season ranges and propername dates) rftssn: one of four season keywords: winter, spring, summer, fall (lowercase) ]] local function make_COinS_date (input, tCOinS_date) local date; -- one date or first date in a range local date2 = ''; -- end of range date if 1582 > tonumber(input.year) or 20 < tonumber(input.month) then -- Julian calendar or season so &rft.date gets year only date = input.year; if 0 ~= input.year2 and input.year ~= input.year2 then -- if a range, only the second year portion when not the same as range start year date = string.format ('%.4d/%.4d', tonumber(input.year), tonumber(input.year2)) -- assemble the date range end if 20 < tonumber(input.month) then -- if season or propername date local season = {[21]='winter', [22]='spring', [23]='summer', [24]='fall', [31]='Christmas'}; -- seasons lowercase, no autumn; proper names use title case if 0 == input.month2 then -- single season date if 30 <tonumber(input.month) then tCOinS_date.rftchron = season[input.month]; -- proper name dates else tCOinS_date.rftssn = season[input.month]; -- seasons end else -- season range with a second season specified if input.year ~= input.year2 then -- season year – season year range or season year–year tCOinS_date.rftssn = season[input.month]; -- start of range season; keep this? if 0~= month2 then tCOinS_date.rftchron = string.format ('%s %s – %s %s', season[input.month], input.year, season[input.month2], input.year2); end else -- season–season year range tCOinS_date.rftssn = season[input.month]; -- start of range season; keep this? tCOinS_date.rftchron = season[input.month] .. '–' .. season[input.month2]; -- season–season year range end end end tCOinS_date.rftdate = date; return; -- done end if 0 ~= input.day then date = string.format ('%s-%.2d-%.2d', input.year, tonumber(input.month), tonumber(input.day)); -- whole date elseif 0 ~= input.month then date = string.format ('%s-%.2d', input.year, tonumber(input.month)); -- year and month else date = string.format ('%s', input.year); -- just year end if 0 ~= input.year2 then if 0 ~= input.day2 then date2 = string.format ('/%s-%.2d-%.2d', input.year2, tonumber(input.month2), tonumber(input.day2)); -- whole date elseif 0 ~= input.month2 then date2 = string.format ('/%s-%.2d', input.year2, tonumber(input.month2)); -- year and month else date2 = string.format ('/%s', input.year2); -- just year end end tCOinS_date.rftdate = date .. date2; -- date2 has the '/' separator return; end --[[--------------------------< C H E C K _ D A T E >---------------------------------------------------------- Check date format to see that it is one of the formats approved by WP:DATESNO or WP:DATERANGE. Exception: only allowed range separator is endash. Additionally, check the date to see that it is a real date: no 31 in 30-day months; no 29 February when not a leap year. Months, both long-form and three character abbreviations, and seasons must be spelled correctly. Future years beyond next year are not allowed. If the date fails the format tests, this function returns false and does not return values for anchor_year and COinS_date. When this happens, the date parameter is used in the COinS metadata and the CITEREF identifier gets its year from the year parameter if present otherwise CITEREF does not get a date value. Inputs: date_string - date string from date-holding parameters (date, year, accessdate, embargo, archivedate, etc.) Returns: false if date string is not a real date; else true, anchor_year, COinS_date anchor_year can be used in CITEREF anchors COinS_date is ISO 8601 format date; see make_COInS_date() ]] local function check_date (date_string, tCOinS_date) local year; -- assume that year2, months, and days are not used; local year2=0; -- second year in a year range local month=0; local month2=0; -- second month in a month range local day=0; local day2=0; -- second day in a day range local anchor_year; local coins_date; if date_string:match("^%d%d%d%d%-%d%d%-%d%d$") then -- year-initial numerical year month day format year, month, day=string.match(date_string, "(%d%d%d%d)%-(%d%d)%-(%d%d)"); if 12 < tonumber(month) or 1 > tonumber(month) or 1583 > tonumber(year) then return false; end -- month number not valid or not Gregorian calendar anchor_year = year; elseif date_string:match("^%a+ +[1-9]%d?, +[1-9]%d%d%d%a?$") then -- month-initial: month day, year month, day, anchor_year, year=string.match(date_string, "(%a+)%s*(%d%d?),%s*((%d%d%d%d)%a?)"); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months elseif date_string:match("^%a+ +[1-9]%d?–[1-9]%d?, +[1-9]%d%d%d%a?$") then -- month-initial day range: month day–day, year; days are separated by endash month, day, day2, anchor_year, year=string.match(date_string, "(%a+) +(%d%d?)–(%d%d?), +((%d%d%d%d)%a?)"); if tonumber(day) >= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same; month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months month2=month; -- for metadata year2=year; elseif date_string:match("^[1-9]%d? +%a+ +[1-9]%d%d%d%a?$") then -- day-initial: day month year day, month, anchor_year, year=string.match(date_string, "(%d%d*)%s*(%a+)%s*((%d%d%d%d)%a?)"); month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months elseif date_string:match("^[1-9]%d?–[1-9]%d? +%a+ +[1-9]%d%d%d%a?$") then -- day-range-initial: day–day month year; days are separated by endash day, day2, month, anchor_year, year=string.match(date_string, "(%d%d?)–(%d%d?) +(%a+) +((%d%d%d%d)%a?)"); if tonumber(day) >= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same; month = get_month_number (month); if 0 == month then return false; end -- return false if month text isn't one of the twelve months month2=month; -- for metadata year2=year; elseif date_string:match("^[1-9]%d? +%a+ – [1-9]%d? +%a+ +[1-9]%d%d%d%a?$") then -- day initial month-day-range: day month - day month year; uses spaced endash day, month, day2, month2, anchor_year, year=date_string:match("(%d%d?) +(%a+) – (%d%d?) +(%a+) +((%d%d%d%d)%a?)"); if (not is_valid_month_season_range(month, month2)) or not is_valid_year(year) then return false; end -- date range order is left to right: earlier to later; month = get_month_number (month); -- for metadata month2 = get_month_number (month2); year2=year; elseif date_string:match("^%a+ +[1-9]%d? – %a+ +[1-9]%d?, +[1-9]%d%d%d?%a?$") then -- month initial month-day-range: month day – month day, year; uses spaced endash month, day, month2, day2, anchor_year, year=date_string:match("(%a+) +(%d%d?) – (%a+) +(%d%d?), +((%d%d%d%d)%a?)"); if (not is_valid_month_season_range(month, month2)) or not is_valid_year(year) then return false; end month = get_month_number (month); -- for metadata month2 = get_month_number (month2); year2=year; elseif date_string:match("^[1-9]%d? +%a+ +[1-9]%d%d%d – [1-9]%d? +%a+ +[1-9]%d%d%d%a?$") then -- day initial month-day-year-range: day month year - day month year; uses spaced endash day, month, year, day2, month2, anchor_year, year2=date_string:match("(%d%d?) +(%a+) +(%d%d%d%d?) – (%d%d?) +(%a+) +((%d%d%d%d?)%a?)"); if tonumber(year2) <= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style month = get_month_number (month); -- for metadata month2 = get_month_number (month2); elseif date_string:match("^%a+ +[1-9]%d?, +[1-9]%d%d%d – %a+ +[1-9]%d?, +[1-9]%d%d%d%a?$") then -- month initial month-day-year-range: month day, year – month day, year; uses spaced endash month, day, year, month2, day2, anchor_year, year2=date_string:match("(%a+) +(%d%d?), +(%d%d%d%d) – (%a+) +(%d%d?), +((%d%d%d%d)%a?)"); if tonumber(year2) <= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style month = get_month_number (month); -- for metadata month2 = get_month_number (month2); elseif date_string:match("^%a+ +[1-9]%d%d%d–%d%d%a?$") then -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash local century; month, year, century, anchor_year, year2=date_string:match("(%a+) +((%d%d)%d%d)–((%d%d)%a?)"); if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Winter or Summer anchor_year=year..'–'..anchor_year; -- assemble anchor_year from both years year2 = century..year2; -- add the century to year2 for comparisons if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) then return false; end -- no year farther in the future than next year month = get_season_number (month); elseif date_string:match("^%a+ +[1-9]%d%d%d–[1-9]%d%d%d%a?$") then -- special case Winter/Summer year-year; year separated with unspaced endash month, year, anchor_year, year2=date_string:match("(%a+) +(%d%d%d%d)–((%d%d%d%d)%a?)"); if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Winter or Summer anchor_year=year..'–'..anchor_year; -- assemble anchor_year from both years if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later if not is_valid_year(year2) then return false; end -- no year farther in the future than next year month = get_season_number (month); -- for metadata elseif date_string:match("^%a+ +[1-9]%d%d%d% – %a+ +[1-9]%d%d%d%a?$") then -- month/season year - month/season year; separated by spaced endash month, year, month2, anchor_year, year2=date_string:match("(%a+) +(%d%d%d%d) – (%a+) +((%d%d%d%d)%a?)"); anchor_year=year..'–'..anchor_year; -- assemble anchor_year from both years if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year if 0 ~= get_month_number(month) and 0 ~= get_month_number(month2) and is_valid_month_range_style(month, month2) then -- both must be month year, same month style month = get_month_number(month); month2 = get_month_number(month2); elseif 0 ~= get_season_number(month) and 0 ~= get_season_number(month2) then -- both must be or season year, not mixed month = get_season_number(month); month2 = get_season_number(month2); else return false; end elseif date_string:match ("^%a+–%a+ +[1-9]%d%d%d%a?$") then -- month/season range year; months separated by endash month, month2, anchor_year, year=date_string:match ("(%a+)–(%a+)%s*((%d%d%d%d)%a?)"); if (not is_valid_month_season_range(month, month2)) or (not is_valid_year(year)) then return false; end if 0 ~= get_month_number(month) then -- determined to be a valid range so just check this one to know if month or season month = get_month_number(month); month2 = get_month_number(month2); else month = get_season_number(month); month2 = get_season_number(month2); end year2=year; elseif date_string:match("^%a+ +%d%d%d%d%a?$") then -- month/season year or proper-name year month, anchor_year, year=date_string:match("(%a+)%s*((%d%d%d%d)%a?)"); if not is_valid_year(year) then return false; end if not is_valid_month_or_season (month) and 0 == is_proper_name (month) then return false; end if 0 ~= get_month_number(month) then -- determined to be a valid range so just check this one to know if month or season month = get_month_number(month); elseif 0 ~= get_season_number(month) then month = get_season_number(month); else month = is_proper_name (month); -- must be proper name; not supported in COinS end elseif date_string:match("^[1-9]%d%d%d?–[1-9]%d%d%d?%a?$") then -- Year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999 year, anchor_year, year2=date_string:match("(%d%d%d%d?)–((%d%d%d%d?)%a?)"); anchor_year=year..'–'..anchor_year; -- assemble anchor year from both years if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year elseif date_string:match("^[1-9]%d%d%d–%d%d%a?$") then -- Year range: YYYY–YY; separated by unspaced endash local century; year, century, anchor_year, year2=date_string:match("((%d%d)%d%d)–((%d%d)%a?)"); anchor_year=year..'–'..anchor_year; -- assemble anchor year from both years if 13 > tonumber(year2) then return false; end -- don't allow 2003-05 which might be May 2003 year2 = century..year2; -- add the century to year2 for comparisons if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same if not is_valid_year(year2) then return false; end -- no year farther in the future than next year elseif date_string:match("^[1-9]%d%d%d?%a?$") then -- year; here accept either YYY or YYYY anchor_year, year=date_string:match("((%d%d%d%d?)%a?)"); if false == is_valid_year(year) then return false; end -- LOCAL: do not use mw.ustring: it allows full-width characters for %d. elseif date_string:match("^[1-9]%d%d%d年[1-9]%d?月[1-9]%d?日$") then -- zh: year month day year, month, day=date_string:match("(%d%d%d%d)年(%d%d*月)(%d%d*)日"); month = get_month_number (month); if 0 == month then return false; end anchor_year = year; elseif date_string:match("^[1-9]%d%d%d年[1-9]%d?月$") then -- zh: year month year, month=date_string:match("(%d%d%d%d)年(%d%d*月)"); month = get_month_number (month); if 0 == month then return false; end anchor_year = year; elseif date_string:match("^[1-9]%d%d%d?年$") then -- zh: year; here accept either YYY or YYYY year=date_string:match("(%d%d%d%d?)年"); if false == is_valid_year(year) then return false; end anchor_year = year; elseif date_string:match("^%d%d%d%d%-%d%d$") then -- numerical year month format year, month=date_string:match("(%d%d%d%d)%-(%d%d)"); month=tonumber(month); if 12 < month or 1 > month or 1583 > tonumber(year) then return false; end -- month number not valid or not Gregorian calendar anchor_year = year; -- END LOCAL else return false; -- date format not one of the MOS:DATE approved formats end local result=true; -- check whole dates for validity; assume true because not all dates will go through this test if 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 == day2 then -- YMD (simple whole date) result=is_valid_date(year,month,day); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 ~= day2 then -- YMD-d (day range) result=is_valid_date(year,month,day); result=result and is_valid_date(year,month,day2); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-md (day month range) result=is_valid_date(year,month,day); result=result and is_valid_date(year,month2,day2); elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 ~= year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-ymd (day month year range) result=is_valid_date(year,month,day); result=result and is_valid_date(year2,month2,day2); end if false == result then return false; end if nil ~= tCOinS_date then -- this table only passed into this function when testing |date= parameter values make_COinS_date ({year=year, month=month, day=day, year2=year2, month2=month2, day2=day2}, tCOinS_date); -- make an ISO 8601 date string for COinS end return true, anchor_year; -- format is good and date string represents a real date end --[[--------------------------< D A T E S >-------------------------------------------------------------------- Cycle the date-holding parameters in passed table date_parameters_list through check_date() to check compliance with MOS:DATE. For all valid dates, check_date() returns true. The |date= parameter test is unique, it is the only date holding parameter from which values for anchor_year (used in CITEREF identifiers) and COinS_date (used in the COinS metadata) are derived. The |date= parameter is the only date-holding parameter that is allowed to contain the no-date keywords "n.d." or "nd" (without quotes). Unlike most error messages created in this module, only one error message is created by this function. Because all of the date holding parameters are processed serially, a single error message is created as the dates are tested. ]] local function dates(date_parameters_list, tCOinS_date) local anchor_year; -- will return as nil if the date being tested is not |date= local COinS_date; -- will return as nil if the date being tested is not |date= local error_message = ""; local good_date = false; for k, v in pairs(date_parameters_list) do -- for each date-holding parameter in the list if is_set(v) then -- if the parameter has a value if v:match("^c%. [1-9]%d%d%d?%a?$") then -- special case for c. year or with or without CITEREF disambiguator - only |date= and |year= local year = v:match("c%. ([1-9]%d%d%d?)%a?"); -- get the year portion so it can be tested if 'date'==k then anchor_year, COinS_date = v:match("((c%. [1-9]%d%d%d?)%a?)"); -- anchor year and COinS_date only from |date= parameter good_date = is_valid_year(year); elseif 'year'==k then good_date = is_valid_year(year); end elseif 'date'==k then -- if the parameter is |date= if v:match("^n%.d%.%a?") then -- if |date=n.d. with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v:match("((n%.d%.)%a?)"); --"n.d."; no error when date parameter is set to no date elseif v:match("^nd%a?$") then -- if |date=nd with or without a CITEREF disambiguator good_date, anchor_year, COinS_date = true, v:match("((nd)%a?)"); --"nd"; no error when date parameter is set to no date else good_date, anchor_year, COinS_date = check_date (v, tCOinS_date); -- go test the date end elseif 'access-date'==k then -- if the parameter is |date= good_date = check_date (v); -- go test the date if true == good_date then -- if the date is a valid date good_date = is_valid_accessdate (v); -- is Wikipedia start date < accessdate < tomorrow's date? end else -- any other date-holding parameter good_date = check_date (v); -- go test the date end if false==good_date then -- assemble one error message so we don't add the tracking category multiple times if is_set(error_message) then -- once we've added the first portion of the error message ... error_message=error_message .. ", "; -- ... add a comma space separator end error_message=error_message .. "&#124;" .. k .. "="; -- add the failed parameter end end end return anchor_year, error_message; -- and done end --[[--------------------------< Y E A R _ D A T E _ C H E C K >------------------------------------------------ Compare the value provided in |year= with the year value(s) provided in |date=. This function returns a numeric value: 0 - year value does not match the year value in date 1 - (default) year value matches the year value in date or one of the year values when date contains two years 2 - year value matches the year value in date when date is in the form YYYY-MM-DD and year is disambiguated (|year=YYYYx) ]] local function year_date_check (year_string, date_string) local year; local date1; local date2; local result = 1; -- result of the test; assume that the test passes year = year_string:match ('(%d%d%d%d?)'); if date_string:match ('%d%d%d%d%-%d%d%-%d%d') and year_string:match ('%d%d%d%d%a') then --special case where date and year required YYYY-MM-DD and YYYYx date1 = date_string:match ('(%d%d%d%d)'); year = year_string:match ('(%d%d%d%d)'); if year ~= date1 then result = 0; -- years don't match else result = 2; -- years match; but because disambiguated, don't add to maint cat end elseif date_string:match ("%d%d%d%d?.-%d%d%d%d?") then -- any of the standard formats of date with two three- or four-digit years date1, date2 = date_string:match ("(%d%d%d%d?).-(%d%d%d%d?)"); if year ~= date1 and year ~= date2 then result = 0; end elseif date_string:match ("%d%d%d%d[%s%-–]+%d%d") then -- YYYY-YY date ranges local century; date1, century, date2 = date_string:match ("((%d%d)%d%d)[%s%-–]+(%d%d)"); date2 = century..date2; -- convert YY to YYYY if year ~= date1 and year ~= date2 then result = 0; end elseif date_string:match ("%d%d%d%d?") then -- any of the standard formats of date with one year date1 = date_string:match ("(%d%d%d%d?)"); if year ~= date1 then result = 0; end end return result; end return {dates = dates, year_date_check = year_date_check, is_valid_date_from_a_point = is_valid_date_from_a_point} -- return exported functions ed984e5750e25e443f23ede2446e5932e2e0d0a4 Module:Citation/CS1/Identifiers 828 25 37 2022-09-24T01:22:31Z Richard Robin 2 创建页面,内容为“--[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local is_set, in_array, set_error, select_one, add_maint_cat, substitute, make_wikilink, is_valid_date_from_a_point; -- functions in Module:Citation/CS1/Utilities or Module:Citation/CS1/Date_validation local z; -- table of tables defined in Module:Citation/CS1/Utilities local cfg; -- table o…” Scribunto text/plain --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local is_set, in_array, set_error, select_one, add_maint_cat, substitute, make_wikilink, is_valid_date_from_a_point; -- functions in Module:Citation/CS1/Utilities or Module:Citation/CS1/Date_validation local z; -- table of tables defined in Module:Citation/CS1/Utilities local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration local wd_int_lang = (mw.site.server:match ('wikidata') and mw.getCurrentFrame():preprocess('{{int:lang}}')) or ''; --============================<< H E L P E R F U N C T I O N S >>============================================ --[[--------------------------< E X T E R N A L _ L I N K _ I D >---------------------------------------------- Formats a wiki style external link 警告:该函数与英文站CS1模块中相应函数不兼容,请勿盲目替换! ]] local function external_link_id(options) local url_string = options.link_id or options.id; local ext_link; if options.encode == true or options.encode == nil then url_string = mw.uri.encode( url_string ); end ext_link = mw.ustring.format( '[%s%s%s \<span title\=\"%s\"\>%s%s%s\<\/span\>]', options.prefix, url_string, options.suffix or "", options.link, options.label, options.separator or "&nbsp;", mw.text.nowiki(options.id) ); if is_set (options.access) then ext_link = substitute (cfg.presentation['access-signal'], {ext_link, cfg.presentation[options.access]}); -- add the free-to-read / paywall lock end return ext_link; end --[[--------------------------< I N T E R N A L _ L I N K _ I D >---------------------------------------------- Formats a wiki style internal link ]] local function internal_link_id(options) return mw.ustring.format( '[[%s%s%s|\<span title\=\"%s\"\>%s\<\/span\>%s%s]]', options.prefix, options.id, options.suffix or "", options.link, options.label, options.separator or "&nbsp;", mw.text.nowiki(options.id) ); end --[[--------------------------< I S _ E M B A R G O E D >------------------------------------------------------ Determines if a PMC identifier's online version is embargoed. Compares the date in |embargo= against today's date. If embargo date is in the future, returns the content of |embargo=; otherwise, returns and empty string because the embargo has expired or because |embargo= was not set in this cite. ]] local function is_embargoed (embargo) if is_set (embargo) then local lang = mw.getContentLanguage(); local good1, embargo_date, good2, todays_date; good1, embargo_date = pcall( lang.formatDate, lang, 'U', embargo ); good2, todays_date = pcall( lang.formatDate, lang, 'U' ); if good1 and good2 then -- if embargo date and today's date are good dates if tonumber( embargo_date ) >= tonumber( todays_date ) then -- is embargo date is in the future? return embargo; -- still embargoed else add_maint_cat ('embargo') return ''; -- unset because embargo has expired end end end return ''; -- |embargo= not set return empty string end --[[--------------------------< IS _ V A L I D _ C H I N E S E _ B O O K _ C A T E G O R Y >---------------------- 检查是否为GB/T 9999.1-2018附表B.1规定的合法图书分类 ]] local function is_valid_Chinese_book_category (str) return in_array (str, { "A", "B", "B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "B80", "B82", "B83", "B84", "B9", "C", "C0", "C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "C91", "C92", "C93", "C94", "C95", "C96", "C97", "D", "D0", "D1", "D2", "D33", "D4", "D5", "D6", "D73", "D8", "D9", "DF", "E", "E0", "E1", "E2", "E3", "E8", "E9", "E99", "F", "F0", "F1", "F2", "F3", "F4", "F49", "F5", "F59", "F6", "F7", "F8", "G", "G0", "G1", "G2", "G3", "G4", "G8", "H", "H0", "H1", "H2", "H3", "H4", "H5", "H61", "H62", "H63", "H64", "H65", "H66", "H67", "H7", "H81", "H83", "H84", "H9", "I", "I0", "I1", "I2", "I3", "I7", "J", "J0", "J1", "J19", "J2", "J29", "J3", "J4", "J5", "J59", "J6", "J7", "J8", "J9", "K", "K0", "K1", "K2", "K3", "K4", "K5", "K6", "K7", "K81", "K85", "K89", "K9", "N", "N0", "N1", "N2", "N3", "N4", "N5", "N6", "N7", "N79", "N8", "N91", "N93", "N94", "N99", "O", "O1", "O3", "O4", "O6", "O7", "P", "P1", "P2", "P3", "P4", "P5", "P6", "P7", "P9", "Q", "Q1", "Q2", "Q3", "Q4", "Q5", "Q6", "Q7", "Q81", "Q89", "Q91", "Q93", "Q94", "Q95", "Q96", "Q98", "R", "R1", "R2", "R3", "R4", "R5", "R6", "R71", "R72", "R73", "R74", "R75", "R76", "R77", "R78", "R79", "R8", "R9", "S", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "T", "TB", "TD", "TE", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TP", "TQ", "TS", "TU", "TV", "U", "U1", "U2", "U4", "U6", "U8", "V", "V1", "V2", "V4", "V7", "X", "X1", "X2", "X3", "X4", "X5", "X7", "X8", "X9", "Z" }); end --[[--------------------------< IS _ V A L I D _ I S X N >----------------------------------------------------- ISBN-10 and ISSN validator code calculates checksum across all isbn/issn digits including the check digit. ISBN-13 is checked in isbn(). If the number is valid the result will be 0. Before calling this function, issbn/issn must be checked for length and stripped of dashes, spaces and other non-isxn characters. ]] local function is_valid_isxn (isxn_str, len) local temp = 0; isxn_str = { isxn_str:byte(1, len) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39, 'X' → 0x58 len = len+1; -- adjust to be a loop counter for i, v in ipairs( isxn_str ) do -- loop through all of the bytes and calculate the checksum if v == string.byte( "X" ) then -- if checkdigit is X (compares the byte value of 'X' which is 0x58) temp = temp + 10*( len - i ); -- it represents 10 decimal else temp = temp + tonumber( string.char(v) )*(len-i); end end return temp % 11 == 0; -- returns true if calculation result is zero end --[[--------------------------< IS _ V A L I D _ I S X N _ 1 3 >----------------------------------------------- ISBN-13 and ISMN validator code calculates checksum across all 13 isbn/ismn digits including the check digit. If the number is valid, the result will be 0. Before calling this function, isbn-13/ismn must be checked for length and stripped of dashes, spaces and other non-isxn-13 characters. ]] local function is_valid_isxn_13 (isxn_str) local temp=0; isxn_str = { isxn_str:byte(1, 13) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39 for i, v in ipairs( isxn_str ) do temp = temp + (3 - 2*(i % 2)) * tonumber( string.char(v) ); -- multiply odd index digits by 1, even index digits by 3 and sum; includes check digit end return temp % 10 == 0; -- sum modulo 10 is zero when isbn-13/ismn is correct end --[[--------------------------< N O R M A L I Z E _ L C C N >-------------------------------------------------- lccn normalization (http://www.loc.gov/marc/lccn-namespace.html#normalization) 1. Remove all blanks. 2. If there is a forward slash (/) in the string, remove it, and remove all characters to the right of the forward slash. 3. If there is a hyphen in the string: a. Remove it. b. Inspect the substring following (to the right of) the (removed) hyphen. Then (and assuming that steps 1 and 2 have been carried out): 1. All these characters should be digits, and there should be six or less. (not done in this function) 2. If the length of the substring is less than 6, left-fill the substring with zeroes until the length is six. Returns a normalized lccn for lccn() to validate. There is no error checking (step 3.b.1) performed in this function. ]] local function normalize_lccn (lccn) lccn = lccn:gsub ("%s", ""); -- 1. strip whitespace if nil ~= string.find (lccn,'/') then lccn = lccn:match ("(.-)/"); -- 2. remove forward slash and all character to the right of it end local prefix local suffix prefix, suffix = lccn:match ("(.+)%-(.+)"); -- 3.a remove hyphen by splitting the string into prefix and suffix if nil ~= suffix then -- if there was a hyphen suffix=string.rep("0", 6-string.len (suffix)) .. suffix; -- 3.b.2 left fill the suffix with 0s if suffix length less than 6 lccn=prefix..suffix; -- reassemble the lccn end return lccn; end --============================<< I D E N T I F I E R F U N C T I O N S >>==================================== --[[--------------------------< A R X I V >-------------------------------------------------------------------- See: http://arxiv.org/help/arxiv_identifier format and error check arXiv identifier. There are three valid forms of the identifier: the first form, valid only between date codes 9108 and 0703 is: arXiv:<archive>.<class>/<date code><number><version> where: <archive> is a string of alpha characters - may be hyphenated; no other punctuation <class> is a string of alpha characters - may be hyphenated; no other punctuation; not the same as |class= parameter which is not supported in this form <date code> is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01 first digit of YY for this form can only 9 and 0 <number> is a three-digit number <version> is a 1 or more digit number preceded with a lowercase v; no spaces (undocumented) the second form, valid from April 2007 through December 2014 is: arXiv:<date code>.<number><version> where: <date code> is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01 <number> is a four-digit number <version> is a 1 or more digit number preceded with a lowercase v; no spaces the third form, valid from January 2015 is: arXiv:<date code>.<number><version> where: <date code> and <version> are as defined for 0704-1412 <number> is a five-digit number ]] local function arxiv (id, class) local handler = cfg.id_handlers['ARXIV']; local year, month, version; local err_cat = false; -- assume no error message local text; -- output text if id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%d$") or id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%dv%d+$") then -- test for the 9108-0703 format w/ & w/o version year, month = id:match("^%a[%a%.%-]+/([90]%d)([01]%d)%d%d%d[v%d]*$"); year = tonumber(year); month = tonumber(month); if ((not (90 < year or 8 > year)) or (1 > month or 12 < month)) or -- if invalid year or invalid month ((91 == year and 7 > month) or (7 == year and 3 < month)) then -- if years ok, are starting and ending months ok? err_cat = true; -- flag for error message end elseif id:match("^%d%d[01]%d%.%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%dv%d+$") then -- test for the 0704-1412 w/ & w/o version year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d[v%d]*$"); year = tonumber(year); month = tonumber(month); if ((7 > year) or (14 < year) or (1 > month or 12 < month)) or -- is year invalid or is month invalid? (doesn't test for future years) ((7 == year) and (4 > month)) then --or -- when year is 07, is month invalid (before April)? err_cat = true; -- flag for error message end elseif id:match("^%d%d[01]%d%.%d%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%d%dv%d+$") then -- test for the 1501- format w/ & w/o version year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d%d[v%d]*$"); year = tonumber(year); month = tonumber(month); if ((15 > year) or (1 > month or 12 < month)) then -- is year invalid or is month invalid? (doesn't test for future years) err_cat = true; -- flag for error message end else err_cat = true; -- not a recognized format; flag for error message end err_cat = err_cat and table.concat ({' ', set_error ('bad_arxiv')}) or ''; -- set error message if flag is true text = external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=handler.access}) .. err_cat; if is_set (class) then if id:match ('^%d+') then text = table.concat ({text, ' [[//arxiv.org/archive/', class, ' ', class, ']]'}); -- external link within square brackets, not wikilink else text = table.concat ({text, ' ', set_error ('class_ignored')}); end end return text; end --[[--------------------------< B I B C O D E >-------------------------------------------------------------------- Validates (sort of) and formats a bibcode id. Format for bibcodes is specified here: http://adsabs.harvard.edu/abs_doc/help_pages/data.html#bibcodes But, this: 2015arXiv151206696F is apparently valid so apparently, the only things that really matter are length, 19 characters and first four digits must be a year. This function makes these tests: length must be 19 characters characters in position 1–4 must be digits and must represent a year in the range of 1000 – next year 5 must be a letter 6 must be letter, ampersand, or dot (ampersand cannot directly precede a dot; &. ) 7–8 must be letter, digit, ampersand, or dot (ampersand cannot directly precede a dot; &. ) 9–18 must be letter, digit, or dot 19 must be a letter or dot ]] local function bibcode (id, access) local handler = cfg.id_handlers['BIBCODE']; local err_type; local year; local text = external_link_id({link=handler.link, label=handler.label, q = handler.q, prefix=handler.prefix, id=id, separator=handler.separator, encode=handler.encode, access=access}); if 19 ~= id:len() then err_type = 'length'; else year = id:match ("^(%d%d%d%d)[%a][%a&%.][%a&%.%d][%a&%.%d][%a%d%.]+[%a%.]$") -- if not year then -- if nil then no pattern match err_type = 'value'; -- so value error else local next_year = tonumber(os.date ('%Y'))+1; -- get the current year as a number and add one for next year year = tonumber (year); -- convert year portion of bibcode to a number if (1000 > year) or (year > next_year) then err_type = 'year'; -- year out of bounds end if id:find('&%.') then err_type = 'journal'; -- journal abbreviation must not have '&.' (if it does its missing a letter) end end end if is_set (err_type) then -- if there was an error detected text = text .. ' ' .. set_error( 'bad_bibcode', {err_type}); end return text; end --[[--------------------------< B I O R X I V >----------------------------------------------------------------- Format bioRxiv id and do simple error checking. BiorXiv ids are exactly 6 digits. The bioRxiv id is the number following the last slash in the bioRxiv-issued DOI: https://doi.org/10.1101/078733 -> 078733 2019年底,biorxiv更换新格式,故而有必要兼容新旧两种格式,对该函数作出针对性修改 ]] local function biorxiv (id) local handler = cfg.id_handlers['BIORXIV']; local err_cat = ''; -- presume that bioRxiv id is valid local invalid = false; id = id:gsub ("^10.1101/",""); -- doi前缀10.1101/可填可不填,便利用户使用 if nil == id:match ("^%d%d%d%d%d%d$") then -- 不是旧格式 local date_str; if (nil ~= id:match ("^%d%d%d%d%.[01]%d%.[0-3]%d%.%d%d%d%d%d%d$")) then date_str = id:match ("^(%d%d%d%d%.[01]%d%.[0-3]%d)%.%d%d%d%d%d%d$"); else if (nil ~= id:match ("^%d%d%d%d%.[01]%d%.[0-3]%d%.%d%d%d%d%d%dv%d+$")) then date_str = id:match ("^(%d%d%d%d%.[01]%d%.[0-3]%d)%.%d%d%d%d%d%dv%d+$"); else -- 也不匹配新格式,因而为非法格式 invalid = true; end end if (not invalid) then date_str = date_str:gsub ("%.", "-"); if(not is_valid_date_from_a_point(date_str, 1576022400)) then invalid = true; end end end if (invalid) then err_cat = ' ' .. set_error( 'bad_biorxiv'); -- set an error message end return external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix = handler.prefix, id = "10.1101/" .. id, separator = handler.separator, encode = handler.encode, access = handler.access}) .. err_cat; end --[[--------------------------< C I T E S E E R X >------------------------------------------------------------ CiteSeerX use their own notion of "doi" (not to be confused with the identifiers resolved via doi.org). The description of the structure of this identifier can be found at Help_talk:Citation_Style_1/Archive_26#CiteSeerX_id_structure ]] local function citeseerx (id) local handler = cfg.id_handlers['CITESEERX']; local matched; local text = external_link_id({link=handler.link, label=handler.label, q = handler.q, prefix=handler.prefix, id=id, separator=handler.separator, encode=handler.encode, access=handler.access}); matched = id:match ("^10%.1%.1%.[1-9]%d?%d?%d?%.[1-9]%d?%d?%d?$"); if not matched then text = text .. ' ' .. set_error( 'bad_citeseerx' ); end return text; end --[[--------------------------< C N I D >---------------------------------------------------------------------- 判断国内统一刊号的合法性及输出相关内容 ]] local function cnid (id) local handler = cfg.id_handlers['CNID']; local text; local type = 0; local invalid = false; local AA, BBBB, CC; id = id:gsub ("^CN ?", ""); if nil ~= id:match ("^%d%d%-%d%d%d%d$") then AA, BBBB = id:match ("^(%d%d)%-(%d%d%d%d)$"); else if nil ~= id:match ("^%d%d%-%d%d%d%d/[A-Z0-9]+$") then AA, BBBB, CC = id:match ("^(%d%d)%-(%d%d%d%d)/([A-Z0-9]+)$") else invalid = true; end end if (not invalid) then if not in_array (AA, {"09", "10", "11", -- 北京 "12", "13", "14", "15", -- 华北 "21", "22", "23", -- 东北 "30", "31", "32", "33", "34", "35", "36", "37", -- 华东 "41", "42", "43", "44", "45", "46", -- 华中华南 "50", "51", "52", "53", "54", -- 西南 "61", "62", "63", "64", "65" -- 西北 }) then invalid = true ; else local BBBB_num = tonumber (BBBB); if (BBBB_num >= 1 and BBBB_num <= 999) then type = 1; if (nil ~= CC) then invalid = true; end; else if (BBBB_num >= 1000 and BBBB_num <= 5999) then type = 2; if (not is_valid_Chinese_book_category (CC)) then invalid = true; end else type = 3; if (nil ~= CC and not is_valid_Chinese_book_category (CC)) then invalid = true; end end end end end if (not invalid) and (1 == type) then local link_id = id:gsub ("-",""); text = external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix = handler.prefix, suffix = "&typeNum=1", link_id = link_id, id = id, separator = handler.separator, encode = handler.encode}); else if (not invalid) and (2 == type) then text = external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix = handler.prefix, suffix = "&typeNum=2", id = id, separator = handler.separator, encode = handler.encode}); else text = mw.ustring.format( "<span title\=\"%s\"\>%s%s%s\<\/span\>", handler.link, handler.label, handler.separator, mw.text.nowiki (id) ); end end if (invalid) then text = text .. ' ' .. set_error( 'bad_cnid'); end return text; end --[[--------------------------< C S B N >---------------------------------------------------------------------- 判断CSBN的合法性及产生指向豆瓣网的链接。 CSBN格式参考《谈谈国家统一书号与国际标准书号》。 ]] local function csbn (id) local handler = cfg.id_handlers['CSBN']; local text; local invalid = false; id = id:gsub ("%-","·"); if (nil == id:match ("^[1-9]%d?%d%d%d·%d+$")) then -- CSBN由三部分组成,第一部分为中国人民大学图书分类法代号,取值1-17; -- 第二部分为出版社代号,三位;第三部分为种次号,取值不限。 -- 二、三部分间有小圆点;若取值不合该格式,则不合法。 -- 此外,虽然小圆点用"-"取代不合法,但站内误用较多,这里兼容之。 invalid = true; else local category = id:match ("^([1-9]%d?)%d%d%d·%d+$"); local cat_num = tonumber (category); if (cat_num <=0 or cat_num >17) then -- 若分类号取值不在1-17范围内,则不合法。 invalid = true; end end -- 豆瓣网以连接号取代小圆点,故替换之。 local link_id = id:gsub ("·","%-"); text = external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix = handler.prefix, link_id = link_id, id = id, separator = handler.separator, encode = handler.encode}); if (invalid) then text = text .. ' ' .. set_error( 'bad_csbn'); end return text; end --[[--------------------------< D O I >------------------------------------------------------------------------ Formats a DOI and checks for DOI errors. DOI names contain two parts: prefix and suffix separated by a forward slash. Prefix: directory indicator '10.' followed by a registrant code Suffix: character string of any length chosen by the registrant This function checks a DOI name for: prefix/suffix. If the doi name contains spaces or endashes, or, if it ends with a period or a comma, this function will emit a bad_doi error message. DOI names are case-insensitive and can incorporate any printable Unicode characters so the test for spaces, endash, and terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely if ever used in doi names. ]] local function doi(id, inactive, access) local cat = "" local handler = cfg.id_handlers['DOI']; local text; if is_set(inactive) then local inactive_year = inactive:match("%d%d%d%d") or ''; -- try to get the year portion from the inactive date if is_set(inactive_year) then table.insert( z.error_categories, "自" .. inactive_year .. "年含有不活躍DOI的頁面" ); else table.insert( z.error_categories, "含有不活躍DOI的頁面" ); -- when inactive doesn't contain a recognizable year end inactive = " (" .. cfg.messages['inactive'] .. " " .. inactive .. ")" end text = external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=access}) .. (inactive or '') if nil == id:match("^10%.[^%s–]-/[^%s–]-[^%.,]$") then -- doi must begin with '10.', must contain a fwd slash, must not contain spaces or endashes, and must not end with period or comma cat = ' ' .. set_error( 'bad_doi' ); end return text .. cat end --[[--------------------------< H D L >------------------------------------------------------------------------ Formats an HDL with minor error checking. HDL names contain two parts: prefix and suffix separated by a forward slash. Prefix: character string using any character in the UCS-2 character set except '/' Suffix: character string of any length using any character in the UCS-2 character set chosen by the registrant This function checks a HDL name for: prefix/suffix. If the HDL name contains spaces, endashes, or, if it ends with a period or a comma, this function will emit a bad_hdl error message. HDL names are case-insensitive and can incorporate any printable Unicode characters so the test for endashes and terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely if ever used in HDLs. ]] local function hdl(id, access) local handler = cfg.id_handlers['HDL']; local text = external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=access}) if nil == id:match("^[^%s–]-/[^%s–]-[^%.,]$") then -- hdl must contain a fwd slash, must not contain spaces, endashes, and must not end with period or comma text = text .. ' ' .. set_error( 'bad_hdl' ); end return text; end --[[--------------------------< I S B N >---------------------------------------------------------------------- Determines whether an ISBN string is valid ]] local function isbn( isbn_str ) if nil ~= isbn_str:match("[^%s-0-9X]") then return false, 'invalid character'; -- fail if isbn_str contains anything but digits, hyphens, or the uppercase X end isbn_str = isbn_str:gsub( "-", "" ):gsub( " ", "" ); -- remove hyphens and spaces local len = isbn_str:len(); if len ~= 10 and len ~= 13 then return false, 'length'; -- fail if incorrect length end if len == 10 then if isbn_str:match( "^%d*X?$" ) == nil then -- fail if isbn_str has 'X' anywhere but last position return false, 'invalid form'; end return is_valid_isxn(isbn_str, 10), 'checksum'; else if isbn_str:match( "^%d+$" ) == nil then return false, 'invalid character'; -- fail if isbn13 is not all digits end if isbn_str:match( "^97[89]%d*$" ) == nil then return false, 'invalid prefix'; -- fail when isbn13 does not begin with 978 or 979 end return is_valid_isxn_13 (isbn_str), 'checksum'; end end --[[--------------------------< A M A Z O N >------------------------------------------------------------------ Formats a link to Amazon. Do simple error checking: asin must be mix of 10 numeric or uppercase alpha characters. If a mix, first character must be uppercase alpha; if all numeric, asins must be 10-digit isbn. If 10-digit isbn, add a maintenance category so a bot or awb script can replace |asin= with |isbn=. Error message if not 10 characters, if not isbn10, if mixed and first character is a digit. This function is positioned here because it calls isbn() ]] local function asin(id, domain) local err_cat = "" if not id:match("^[%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u]$") then err_cat = ' ' .. set_error ('bad_asin'); -- asin is not a mix of 10 uppercase alpha and numeric characters else if id:match("^%d%d%d%d%d%d%d%d%d[%dX]$") then -- if 10-digit numeric (or 9 digits with terminal X) if isbn( id ) then -- see if asin value is isbn10 add_maint_cat ('ASIN'); elseif not is_set (err_cat) then err_cat = ' ' .. set_error ('bad_asin'); -- asin is not isbn10 end elseif not id:match("^%u[%d%u]+$") then err_cat = ' ' .. set_error ('bad_asin'); -- asin doesn't begin with uppercase alpha end end if not is_set(domain) then domain = "com"; elseif in_array (domain, {'jp', 'uk'}) then -- Japan, United Kingdom domain = "co." .. domain; elseif in_array (domain, {'au', 'br', 'mx'}) then -- Australia, Brazil, Mexico domain = "com." .. domain; end local handler = cfg.id_handlers['ASIN']; return external_link_id({link=handler.link, label=handler.label, q = handler.q, prefix=handler.prefix .. domain .. "/dp/", id=id, encode=handler.encode, separator = handler.separator}) .. err_cat; end --[[--------------------------< I S M N >---------------------------------------------------------------------- Determines whether an ISMN string is valid. Similar to isbn-13, ismn is 13 digits begining 979-0-... and uses the same check digit calculations. See http://www.ismn-international.org/download/Web_ISMN_Users_Manual_2008-6.pdf section 2, pages 9–12. ]] local function ismn (id) local handler = cfg.id_handlers['ISMN']; local text; local valid_ismn = true; local id_copy; id_copy = id; -- save a copy because this testing is destructive id=id:gsub( "[%s-–]", "" ); -- strip spaces, hyphens, and endashes from the ismn if 13 ~= id:len() or id:match( "^9790%d*$" ) == nil then -- ismn must be 13 digits and begin 9790 valid_ismn = false; else valid_ismn=is_valid_isxn_13 (id); -- validate ismn end -- text = internal_link_id({link = handler.link, label = handler.label, -- use this (or external version) when there is some place to link to -- prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) text="[[" .. handler.link .. "|" .. handler.label .. "]]" .. handler.separator .. id; -- because no place to link to yet if false == valid_ismn then text = text .. ' ' .. set_error( 'bad_ismn' ) -- add an error message if the issn is invalid end return text; end --[[--------------------------< I S S N >---------------------------------------------------------------------- Validate and format an issn. This code fixes the case where an editor has included an ISSN in the citation but has separated the two groups of four digits with a space. When that condition occurred, the resulting link looked like this: |issn=0819 4327 gives: [http://www.worldcat.org/issn/0819 4327 0819 4327] -- can't have spaces in an external link This code now prevents that by inserting a hyphen at the issn midpoint. It also validates the issn for length and makes sure that the checkdigit agrees with the calculated value. Incorrect length (8 digits), characters other than 0-9 and X, or checkdigit / calculated value mismatch will all cause a check issn error message. The issn is always displayed with a hyphen, even if the issn was given as a single group of 8 digits. ]] local function issn(id, e) local issn_copy = id; -- save a copy of unadulterated issn; use this version for display if issn does not validate local handler; local text; local valid_issn = true; if e then handler = cfg.id_handlers['EISSN']; else handler = cfg.id_handlers['ISSN']; end id=id:gsub( "[%s-–]", "" ); -- strip spaces, hyphens, and endashes from the issn if 8 ~= id:len() or nil == id:match( "^%d*X?$" ) then -- validate the issn: 8 digits long, containing only 0-9 or X in the last position valid_issn=false; -- wrong length or improper character else valid_issn=is_valid_isxn(id, 8); -- validate issn end if true == valid_issn then id = string.sub( id, 1, 4 ) .. "-" .. string.sub( id, 5 ); -- if valid, display correctly formatted version else id = issn_copy; -- if not valid, use the show the invalid issn with error message end text = external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) if false == valid_issn then text = text .. ' ' .. set_error( 'bad_issn', e and 'e' or '' ) -- add an error message if the issn is invalid end return text end --[[--------------------------< J F M >----------------------------------------------------------------------- A numerical identifier in the form nn.nnnn.nn ]] local function jfm (id) local handler = cfg.id_handlers['JFM']; local id_num; local err_cat = ''; id_num = id:match ('^[Jj][Ff][Mm](.*)$'); -- identifier with jfm prefix; extract identifier if is_set (id_num) then add_maint_cat ('jfm_format'); else -- plain number without mr prefix id_num = id; -- if here id does not have prefix end if id_num and id_num:match('^%d%d%.%d%d%d%d%.%d%d$') then id = id_num; -- jfm matches pattern else err_cat = ' ' .. set_error( 'bad_jfm' ); -- set an error message end return external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) .. err_cat; end --[[--------------------------< L C C N >---------------------------------------------------------------------- Format LCCN link and do simple error checking. LCCN is a character string 8-12 characters long. The length of the LCCN dictates the character type of the first 1-3 characters; the rightmost eight are always digits. http://info-uri.info/registry/OAIHandler?verb=GetRecord&metadataPrefix=reg&identifier=info:lccn/ length = 8 then all digits length = 9 then lccn[1] is lower case alpha length = 10 then lccn[1] and lccn[2] are both lower case alpha or both digits length = 11 then lccn[1] is lower case alpha, lccn[2] and lccn[3] are both lower case alpha or both digits length = 12 then lccn[1] and lccn[2] are both lower case alpha ]] local function lccn(lccn) local handler = cfg.id_handlers['LCCN']; local err_cat = ''; -- presume that LCCN is valid local id = lccn; -- local copy of the lccn id = normalize_lccn (id); -- get canonical form (no whitespace, hyphens, forward slashes) local len = id:len(); -- get the length of the lccn if 8 == len then if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits) err_cat = ' ' .. set_error( 'bad_lccn' ); -- set an error message end elseif 9 == len then -- LCCN should be adddddddd if nil == id:match("%l%d%d%d%d%d%d%d%d") then -- does it match our pattern? err_cat = ' ' .. set_error( 'bad_lccn' ); -- set an error message end elseif 10 == len then -- LCCN should be aadddddddd or dddddddddd if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits) ... if nil == id:match("^%l%l%d%d%d%d%d%d%d%d") then -- ... see if it matches our pattern err_cat = ' ' .. set_error( 'bad_lccn' ); -- no match, set an error message end end elseif 11 == len then -- LCCN should be aaadddddddd or adddddddddd if not (id:match("^%l%l%l%d%d%d%d%d%d%d%d") or id:match("^%l%d%d%d%d%d%d%d%d%d%d")) then -- see if it matches one of our patterns err_cat = ' ' .. set_error( 'bad_lccn' ); -- no match, set an error message end elseif 12 == len then -- LCCN should be aadddddddddd if not id:match("^%l%l%d%d%d%d%d%d%d%d%d%d") then -- see if it matches our pattern err_cat = ' ' .. set_error( 'bad_lccn' ); -- no match, set an error message end else err_cat = ' ' .. set_error( 'bad_lccn' ); -- wrong length, set an error message end if not is_set (err_cat) and nil ~= lccn:find ('%s') then err_cat = ' ' .. set_error( 'bad_lccn' ); -- lccn contains a space, set an error message end return external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=lccn,separator=handler.separator, encode=handler.encode}) .. err_cat; end --[[--------------------------< M R >-------------------------------------------------------------------------- A seven digit number; if not seven digits, zero-fill leading digits to make seven digits. ]] local function mr (id) local handler = cfg.id_handlers['MR']; local id_num; local id_len; local err_cat = ''; id_num = id:match ('^[Mm][Rr](%d+)$'); -- identifier with mr prefix if is_set (id_num) then add_maint_cat ('mr_format'); else -- plain number without mr prefix id_num = id:match ('^%d+$'); -- if here id is all digits end id_len = id_num and id_num:len() or 0; if (7 >= id_len) and (0 ~= id_len) then id = string.rep ('0', 7-id_len ) .. id_num; -- zero-fill leading digits else err_cat = ' ' .. set_error( 'bad_mr' ); -- set an error message end return external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) .. err_cat; end --[[--------------------------< O C L C >---------------------------------------------------------------------- Validate and format an oclc id. https://www.oclc.org/batchload/controlnumber.en.html {{dead link}} archived at: https://web.archive.org/web/20161228233804/https://www.oclc.org/batchload/controlnumber.en.html ]] local function oclc (id) local handler = cfg.id_handlers['OCLC']; local number; local err_msg = ''; -- empty string for concatenation if id:match('^ocm%d%d%d%d%d%d%d%d$') then -- ocm prefix and 8 digits; 001 field (12 characters) number = id:match('ocm(%d+)'); -- get the number elseif id:match('^ocn%d%d%d%d%d%d%d%d%d$') then -- ocn prefix and 9 digits; 001 field (12 characters) number = id:match('ocn(%d+)'); -- get the number elseif id:match('^on%d%d%d%d%d%d%d%d%d%d+$') then -- on prefix and 10 or more digits; 001 field (12 characters) number = id:match('^on(%d%d%d%d%d%d%d%d%d%d+)$'); -- get the number elseif id:match('^%(OCoLC%)[1-9]%d*$') then -- (OCoLC) prefix and variable number digits; no leading zeros; 035 field number = id:match('%(OCoLC%)([1-9]%d*)'); -- get the number if 9 < number:len() then number = nil; -- contrain to 1 to 9 digits; change this when oclc issues 10-digit numbers end elseif id:match('^%d+$') then -- no prefix number = id; -- get the number if 10 < number:len() then number = nil; -- contrain to 1 to 10 digits; change this when oclc issues 11-digit numbers end end if number then -- proper format id = number; -- exclude prefix, if any, from external link else err_msg = ' ' .. set_error( 'bad_oclc' ) -- add an error message if the id is malformed end local text = external_link_id({link=handler.link, label=handler.label, q = handler.q, prefix=handler.prefix, id=id, separator=handler.separator, encode=handler.encode}) .. err_msg; return text; end --[[--------------------------< O P E N L I B R A R Y >-------------------------------------------------------- Formats an OpenLibrary link, and checks for associated errors. ]] local function openlibrary(id, access) local code; local handler = cfg.id_handlers['OL']; local ident; ident, code = id:match("^(%d+([AMW]))$"); -- optional OL prefix followed immediately by digits followed by 'A', 'M', or 'W'; remove OL prefix if not is_set (ident) then -- if malformed return an error return external_link_id({link=handler.link, label=handler.label, q = handler.q, prefix=handler.prefix .. 'OL', id=id, separator=handler.separator, encode = handler.encode, access = access}) .. ' ' .. set_error( 'bad_ol' ); end id = ident; -- use ident without the optional OL prefix (it has been removed) if ( code == "A" ) then return external_link_id({link=handler.link, label=handler.label, q = handler.q, prefix=handler.prefix .. 'authors/OL', id=id, separator=handler.separator, encode = handler.encode, access = access}) end if ( code == "M" ) then return external_link_id({link=handler.link, label=handler.label, q = handler.q, prefix=handler.prefix .. 'books/OL', id=id, separator=handler.separator, encode = handler.encode, access = access}) end if ( code == "W" ) then return external_link_id({link=handler.link, label=handler.label, q = handler.q, prefix=handler.prefix .. 'works/OL', id=id, separator=handler.separator, encode = handler.encode, access = access}) end end --[[--------------------------< P M C >------------------------------------------------------------------------ Format a PMC, do simple error checking, and check for embargoed articles. The embargo parameter takes a date for a value. If the embargo date is in the future the PMC identifier will not be linked to the article. If the embargo date is today or in the past, or if it is empty or omitted, then the PMC identifier is linked to the article through the link at cfg.id_handlers['PMC'].prefix. PMC embargo date testing is done in function is_embargoed () which is called earlier because when the citation has |pmc=<value> but does not have a |url= then |title= is linked with the PMC link. Function is_embargoed () returns the embargo date if the PMC article is still embargoed, otherwise it returns an empty string. PMCs are sequential numbers beginning at 1 and counting up. This code checks the PMC to see that it contains only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more PMCs are issued. ]] local function pmc(id, embargo) local test_limit = 10000000; -- update this value as PMCs approach local handler = cfg.id_handlers['PMC']; local err_cat = ''; -- presume that PMC is valid local id_num; local text; id_num = id:match ('^[Pp][Mm][Cc](%d+)$'); -- identifier with pmc prefix if is_set (id_num) then add_maint_cat ('pmc_format'); else -- plain number without pmc prefix id_num = id:match ('^%d+$'); -- if here id is all digits end if is_set (id_num) then -- id_num has a value so test it id_num = tonumber(id_num); -- convert id_num to a number for range testing if 1 > id_num or test_limit < id_num then -- if PMC is outside test limit boundaries err_cat = ' ' .. set_error( 'bad_pmc' ); -- set an error message else id = tostring (id_num); -- make sure id is a string end else -- when id format incorrect err_cat = ' ' .. set_error( 'bad_pmc' ); -- set an error message end if is_set (embargo) then -- is PMC is still embargoed? text = table.concat ( -- still embargoed so no external link { make_wikilink (handler.link, handler.label), handler.separator, id, err_cat }); else text = external_link_id({link = handler.link, label = handler.label, q = handler.q, -- no embargo date or embargo has expired, ok to link to article prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=handler.access}) .. err_cat; end return text; end --[[--------------------------< P M I D >---------------------------------------------------------------------- Format PMID and do simple error checking. PMIDs are sequential numbers beginning at 1 and counting up. This code checks the PMID to see that it contains only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more PMIDs are issued. ]] local function pmid(id) local test_limit = 40000000; -- update this value as PMIDs approach local handler = cfg.id_handlers['PMID']; local err_cat = ''; -- presume that PMID is valid if id:match("[^%d]") then -- if PMID has anything but digits err_cat = ' ' .. set_error( 'bad_pmid' ); -- set an error message else -- PMID is only digits local id_num = tonumber(id); -- convert id to a number for range testing if 1 > id_num or test_limit < id_num then -- if PMID is outside test limit boundaries err_cat = ' ' .. set_error( 'bad_pmid' ); -- set an error message end end return external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) .. err_cat; end --[[--------------------------< S 2 C I D >-------------------------------------------------------------------- Format an S2CID, do simple error checking S2CIDs are sequential numbers beginning at 1 and counting up. This code checks the S2CID to see that it is only digits and is less than test_limit; the value in local variable test_limit will need to be updated periodically as more S2CIDs are issued. ]] local function s2cid (id, access) local test_limit = 235000000; local handler = cfg.id_handlers['S2CID']; local err_cat = ''; -- presume that S2CID is valid local id_num = id:match ('^[1-9]%d*$'); -- id must be all digits; must not begin with 0; no open access flag if is_set (id_num) then -- id_num has a value so test it id_num = tonumber (id_num); -- convert id_num to a number for range testing if test_limit < id_num then -- if S2CID is outside test limit boundaries err_cat = ' ' .. set_error ('bad_s2cid'); -- set an error message end else -- when id format incorrect err_cat = ' ' .. set_error ('bad_s2cid'); -- set an error message end return external_link_id ({link = handler.link, label = handler.label, q = handler.q, redirect = handler.redirect, prefix = handler.prefix, id = id, separator = handler.separator, encode = handler.encode, access = access}) .. err_cat; end --[[--------------------------< S S R N >---------------------------------------------------------------------- Format an ssrn, do simple error checking SSRNs are sequential numbers beginning at 100? and counting up. This code checks the ssrn to see that it is only digits and is greater than 99 and less than test_limit; the value in local variable test_limit will need to be updated periodically as more SSRNs are issued. ]] local function ssrn (id) local test_limit = 3500000; -- update this value as SSRNs approach local handler = cfg.id_handlers['SSRN']; local err_cat = ''; -- presume that SSRN is valid local id_num; local text; id_num = id:match ('^%d+$'); -- id must be all digits if is_set (id_num) then -- id_num has a value so test it id_num = tonumber(id_num); -- convert id_num to a number for range testing if 100 > id_num or test_limit < id_num then -- if SSRN is outside test limit boundaries err_cat = ' ' .. set_error( 'bad_ssrn' ); -- set an error message end else -- when id format incorrect err_cat = ' ' .. set_error( 'bad_ssrn' ); -- set an error message end text = external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=handler.access}) .. err_cat; return text; end --[[--------------------------< U S E N E T _ I D >------------------------------------------------------------ Validate and format a usenet message id. Simple error checking, looks for 'id-left@id-right' not enclosed in '<' and/or '>' angle brackets. ]] local function usenet_id (id) local handler = cfg.id_handlers['USENETID']; local text = external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) if not id:match('^.+@.+$') or not id:match('^[^<].*[^>]$')then -- doesn't have '@' or has one or first or last character is '< or '>' text = text .. ' ' .. set_error( 'bad_message_id' ) -- add an error message if the message id is invalid end return text end --[[--------------------------< Z B L >----------------------------------------------------------------------- A numerical identifier in the form nnnn.nnnnn - leading zeros in the first quartet optional ]] local function zbl (id) local handler = cfg.id_handlers['ZBL']; local err_cat = ''; id = id:gsub ('^[Zz][Bb][Ll]',""); -- identifier with zbl prefix; extract identifier if (nil ~= id:match ("^%d%d%d%d%d%d%d%d$")) then add_maint_cat ('zbl_format'); -- temporary else if (nil == id:match('^%d?%d?%d?%d%.%d%d%d%d%d$')) then -- id doesn't match the pattern err_cat = ' ' .. set_error( 'bad_zbl' ); -- set an error message end end return external_link_id({link = handler.link, label = handler.label, q = handler.q, prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) .. err_cat; end --============================<< I N T E R F A C E F U N C T I O N S >>========================================== --[[--------------------------< B U I L D _ I D _ L I S T >-------------------------------------------------------- Takes a table of IDs created by extract_ids() and turns it into a table of formatted ID outputs. inputs: id_list – table of identifiers built by extract_ids() options – table of various template parameter values used to modify some manually handled identifiers ]] local function build_id_list( id_list, options ) local new_list, handler = {}; local function fallback(k) return { __index = function(t,i) return cfg.id_handlers[k][i] end } end; for k, v in pairs( id_list ) do -- k is uc identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table -- fallback to read-only cfg handler = setmetatable( { ['id'] = v, ['access'] = options.IdAccessLevels[k] }, fallback(k) ); if handler.mode == 'external' then table.insert( new_list, {handler.label, external_link_id( handler ) } ); elseif handler.mode == 'internal' then table.insert( new_list, {handler.label, internal_link_id( handler ) } ); elseif handler.mode ~= 'manual' then error( cfg.messages['unknown_ID_mode'] ); elseif k == 'ARXIV' then table.insert( new_list, {handler.label, arxiv( v, options.Class ) } ); elseif k == 'ASIN' then table.insert( new_list, {handler.label, asin( v, options.ASINTLD ) } ); elseif k == 'BIBCODE' then table.insert( new_list, {handler.label, bibcode( v, handler.access ) } ); elseif k == 'BIORXIV' then table.insert( new_list, {handler.label, biorxiv( v ) } ); elseif k == 'CITESEERX' then table.insert( new_list, {handler.label, citeseerx( v ) } ); elseif k == 'CNID' then table.insert( new_list, {handler.label, cnid( v ) } ); elseif k == 'CSBN' then table.insert( new_list, {handler.label, csbn( v ) } ); elseif k == 'DOI' then table.insert( new_list, {handler.label, doi( v, options.DoiBroken, handler.access ) } ); elseif k == 'EISSN' then table.insert( new_list, {handler.label, issn( v, true ) } ); -- true distinguishes eissn from issn elseif k == 'HDL' then table.insert( new_list, {handler.label, hdl( v, handler.access ) } ); elseif k == 'ISBN' then local ISBN = internal_link_id( handler ); local check; local err_type = ''; check, err_type = isbn( v ); if not check then if is_set(options.IgnoreISBN) then -- ISBN is invalid; if |ignore-isbn-error= set add_maint_cat ('ignore_isbn_err'); -- ad a maint category else ISBN = ISBN .. set_error( 'bad_isbn', {err_type}, false, " ", "" ); -- else display an error message end elseif is_set(options.IgnoreISBN) then -- ISBN is OK; if |ignore-isbn-error= set add_maint_cat ('ignore_isbn_err'); -- because |ignore-isbn-error= unnecessary end table.insert( new_list, {handler.label, ISBN } ); elseif k == 'ISMN' then table.insert( new_list, {handler.label, ismn( v ) } ); elseif k == 'ISSN' then table.insert( new_list, {handler.label, issn( v ) } ); elseif k == 'JFM' then table.insert( new_list, {handler.label, jfm( v ) } ); elseif k == 'LCCN' then table.insert( new_list, {handler.label, lccn( v ) } ); elseif k == 'MR' then table.insert( new_list, {handler.label, mr( v ) } ); elseif k == 'OCLC' then table.insert( new_list, {handler.label, oclc( v ) } ); elseif k == 'OL' or k == 'OLA' then table.insert( new_list, {handler.label, openlibrary( v, handler.access ) } ); elseif k == 'PMC' then table.insert( new_list, {handler.label, pmc( v, options.Embargo ) } ); elseif k == 'PMID' then table.insert( new_list, {handler.label, pmid( v ) } ); elseif k == 'S2CID' then table.insert( new_list, {handler.label, s2cid( v, handler.access ) } ); elseif k == 'SSRN' then table.insert( new_list, {handler.label, ssrn( v ) } ); elseif k == 'USENETID' then table.insert( new_list, {handler.label, usenet_id( v ) } ); elseif k == 'ZBL' then table.insert( new_list, {handler.label, zbl( v ) } ); else error( cfg.messages['unknown_manual_ID'] ); end end local function comp( a, b ) -- used in following table.sort() return a[1] < b[1]; end table.sort( new_list, comp ); for k, v in ipairs( new_list ) do new_list[k] = v[2]; end return new_list; end --[[--------------------------< E X T R A C T _ I D S >------------------------------------------------------------ Populates ID table from arguments using configuration settings. Loops through cfg.id_handlers and searches args for any of the parameters listed in each cfg.id_handlers['...'].parameters. If found, adds the parameter and value to the identifier list. Emits redundant error message is more than one alias exists in args ]] local function extract_ids( args ) local id_list = {}; -- list of identifiers found in args for k, v in pairs( cfg.id_handlers ) do -- k is uc identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table v = select_one( args, v.parameters, 'redundant_parameters' ); -- v.parameters is a table of aliases for k; here we pick one from args if present if is_set(v) then id_list[k] = v; end -- if found in args, add identifier to our list end return id_list; end --[[--------------------------< E X T R A C T _ I D _ A C C E S S _ L E V E L S >-------------------------------------- Fetches custom id access levels from arguments using configuration settings. Parameters which have a predefined access level (e.g. arxiv) do not use this function as they are directly rendered as free without using an additional parameter. ]] local function extract_id_access_levels( args, id_list ) local id_accesses_list = {}; for k, v in pairs( cfg.id_handlers ) do local access_param = v.custom_access; local k_lower = string.lower(k); if is_set(access_param) then local access_level = args[access_param]; if is_set(access_level) then if not in_array (access_level:lower(), cfg.keywords['id-access']) then table.insert( z.message_tail, { set_error( 'invalid_param_val', {access_param, access_level}, true ) } ); access_level = nil; end if not is_set(id_list[k]) then table.insert( z.message_tail, { set_error( 'param_access_requires_param', {k_lower}, true ) } ); end if is_set(access_level) then access_level = access_level:lower(); end id_accesses_list[k] = access_level; end end end return id_accesses_list; end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local cfg table and imported functions table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr, utilities_page_ptr, validation_page_ptr) cfg = cfg_table_ptr; is_set = utilities_page_ptr.is_set; -- import functions from select Module:Citation/CS1/Utilities module in_array = utilities_page_ptr.in_array; set_error = utilities_page_ptr.set_error; select_one = utilities_page_ptr.select_one; add_maint_cat = utilities_page_ptr.add_maint_cat; substitute = utilities_page_ptr.substitute; make_wikilink = utilities_page_ptr.make_wikilink; is_valid_date_from_a_point = validation_page_ptr.is_valid_date_from_a_point; z = utilities_page_ptr.z; -- table of tables in Module:Citation/CS1/Utilities end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { build_id_list = build_id_list, extract_ids = extract_ids, extract_id_access_levels = extract_id_access_levels, is_embargoed = is_embargoed; set_selected_modules = set_selected_modules; } 276f247e1e62698533d807c60acf00a256d44742 Module:Citation/CS1/Utilities 828 26 38 2022-09-24T01:26:11Z Richard Robin 2 创建页面,内容为“local z = { error_categories = {}; -- for categorizing citations that contain errors error_ids = {}; message_tail = {}; maintenance_cats = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance }; --[[--------------------------< F O R W A R D D E C L A R A T I O N S…” Scribunto text/plain local z = { error_categories = {}; -- for categorizing citations that contain errors error_ids = {}; message_tail = {}; maintenance_cats = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance }; --[[--------------------------< F O R W A R D D E C L A R A T I O N S >-------------------------------------- ]] local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. This function is global because it is called from both this module and from Date validation ]] function is_set( var ) return not (var == nil or var == ''); end --[[--------------------------< F I R S T _ S E T >------------------------------------------------------------ Locates and returns the first set value in a table of values where the order established in the table, left-to-right (or top-to-bottom), is the order in which the values are evaluated. Returns nil if none are set. This version replaces the original 'for _, val in pairs do' and a similar version that used ipairs. With the pairs version the order of evaluation could not be guaranteed. With the ipairs version, a nil value would terminate the for-loop before it reached the actual end of the list. ]] local function first_set (list, count) local i = 1; while i <= count do -- loop through all items in list if is_set( list[i] ) then return list[i]; -- return the first set list member end i = i + 1; -- point to next end end --[[--------------------------< I S _ S C H E M E >------------------------------------------------------------ does this thing that purports to be a uri scheme seem to be a valid scheme? The scheme is checked to see if it is in agreement with http://tools.ietf.org/html/std66#section-3.1 which says: Scheme names consist of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus ("+"), period ("."), or hyphen ("-"). returns true if it does, else false ]] local function is_scheme (scheme) return scheme and scheme:match ('^%a[%a%d%+%.%-]*:'); -- true if scheme is set and matches the pattern end --[=[-------------------------< I S _ D O M A I N _ N A M E >-------------------------------------------------- Does this thing that purports to be a domain name seem to be a valid domain name? Syntax defined here: http://tools.ietf.org/html/rfc1034#section-3.5 BNF defined here: https://tools.ietf.org/html/rfc4234 Single character names are generally reserved; see https://tools.ietf.org/html/draft-ietf-dnsind-iana-dns-01#page-15; see also [[Single-letter second-level domain]] list of tlds: https://www.iana.org/domains/root/db rfc952 (modified by rfc 1123) requires the first and last character of a hostname to be a letter or a digit. Between the first and last characters the name may use letters, digits, and the hyphen. Also allowed are IPv4 addresses. IPv6 not supported domain is expected to be stripped of any path so that the last character in the last character of the tld. tld is two or more alpha characters. Any preceding '//' (from splitting a url with a scheme) will be stripped here. Perhaps not necessary but retained incase it is necessary for IPv4 dot decimal. There are several tests: the first character of the whole domain name including subdomains must be a letter or a digit single-letter/digit second-level domains in the .org TLD q, x, and z SL domains in the .com TLD i and q SL domains in the .net TLD single-letter SL domains in the ccTLDs (where the ccTLD is two letters) two-character SL domains in gTLDs (where the gTLD is two or more letters) three-plus-character SL domains in gTLDs (where the gTLD is two or more letters) IPv4 dot-decimal address format; TLD not allowed returns true if domain appears to be a proper name and tld or IPv4 address, else false ]=] local function is_domain_name (domain) if not domain then return false; -- if not set, abandon end domain = domain:gsub ('^//', ''); -- strip '//' from domain name if present; done here so we only have to do it once if not domain:match ('^[%a%d]') then -- first character must be letter or digit return false; end if domain:match ('%f[%a%d][%a%d]%.org$') then -- one character .org hostname return true; elseif domain:match ('%f[%a][qxz]%.com$') then -- assigned one character .com hostname (x.com times out 2015-12-10) return true; elseif domain:match ('%f[%a][iq]%.net$') then -- assigned one character .net hostname (q.net registered but not active 2015-12-10) return true; elseif domain:match ('%f[%a%d][%a%d][%a%d%-]+[%a%d]%.xn%-%-[%a%d]+$') then -- internationalized domain name with ACE prefix return true; elseif domain:match ('%f[%a%d][%a%d]%.cash$') then -- one character/digit .cash hostname return true; elseif domain:match ('%f[%a%d][%a%d]%.%a%a$') then -- one character hostname and cctld (2 chars) return true; elseif domain:match ('%f[%a%d][%a%d][%a%d]%.%a%a+$') then -- two character hostname and tld return true; elseif domain:match ('%f[%a%d][%a%d][%a%d%-]+[%a%d]%.%a%a+$') then -- three or more character hostname.hostname or hostname.tld return true; elseif domain:match ('^%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?') then -- IPv4 address return true; else return false; end end --[[--------------------------< I S _ U R L >------------------------------------------------------------------ returns true if the scheme and domain parts of a url appear to be a valid url; else false. This function is the last step in the validation process. This function is separate because there are cases that are not covered by split_url(), for example is_parameter_ext_wikilink() which is looking for bracketted external wikilinks. ]] local function is_url (scheme, domain) if is_set (scheme) then -- if scheme is set check it and domain return is_scheme (scheme) and is_domain_name (domain); else return is_domain_name (domain); -- scheme not set when url is protocol relative end end --[[--------------------------< S P L I T _ U R L >------------------------------------------------------------ Split a url into a scheme, authority indicator, and domain. If protocol relative url, return nil scheme and domain else return nil for both scheme and domain. When not protocol relative, get scheme, authority indicator, and domain. If there is an authority indicator (one or more '/' characters following the scheme's colon), make sure that there are only 2. ]] local function split_url (url_str) local scheme, authority, domain; url_str = url_str:gsub ('([%a%d])%.?[/%?#].*$', '%1'); -- strip FQDN terminator and path(/), query(?), fragment (#) (the capture prevents false replacement of '//') if url_str:match ('^//%S*') then -- if there is what appears to be a protocol relative url domain = url_str:match ('^//(%S*)') elseif url_str:match ('%S-:/*%S+') then -- if there is what appears to be a scheme, optional authority indicator, and domain name scheme, authority, domain = url_str:match ('(%S-:)(/*)(%S+)'); -- extract the scheme, authority indicator, and domain portions authority = authority:gsub ('//', '', 1); -- replace place 1 pair of '/' with nothing; if is_set(authority) then -- if anything left (1 or 3+ '/' where authority should be) then return scheme; -- return scheme only making domain nil which will cause an error message end domain = domain:gsub ('(%a):%d+', '%1'); -- strip port number if present end return scheme, domain; end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack ]] local function in_array( needle, haystack ) if needle == nil then return false; end for n,v in ipairs( haystack ) do if v == needle then return n; end end return false; end --[[--------------------------< S U B S T I T U T E >---------------------------------------------------------- Populates numbered arguments in a message string using an argument table. ]] local function substitute( msg, args ) return args and mw.message.newRawMessage( msg, args ):plain() or msg; end --[[--------------------------< E R R O R _ C O M M E N T >---------------------------------------------------- Wraps error messages with css markup according to the state of hidden. ]] local function error_comment( content, hidden ) return substitute( hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content ); end --[[--------------------------< S E T _ E R R O R >-------------------------------------------------------------- Sets an error condition and returns the appropriate error message. The actual placement of the error message in the output is the responsibility of the calling function. ]] local function set_error( error_id, arguments, raw, prefix, suffix ) local error_state = cfg.error_conditions[ error_id ]; prefix = prefix or ""; suffix = suffix or ""; if error_state == nil then error( cfg.messages['undefined_error'] ); elseif is_set( error_state.category ) then table.insert( z.error_categories, error_state.category ); end local message = substitute( error_state.message, arguments ); message = message .. " ([[" .. cfg.messages['help page link'] .. "#" .. error_state.anchor .. "|" .. cfg.messages['help page label'] .. "]])"; z.error_ids[ error_id ] = true; if in_array( error_id, { 'bare_url_missing_title', 'trans_missing_title' } ) and z.error_ids['citation_missing_title'] then return '', false; end message = table.concat({ prefix, message, suffix }); if raw == true then return message, error_state.hidden; end return error_comment( message, error_state.hidden ); end --[[--------------------------< H A S _ A C C E P T _ A S _ W R I T T E N >------------------------------------ When <str> is wholly wrapped in accept-as-written markup, return <str> without markup and true; return <str> and false else with allow_empty = false, <str> must have at least one character inside the markup with allow_empty = true, <str> the markup frame can be empty like (()) to distinguish an empty template parameter from the specific condition "has no applicable value" in citation-context. After further evaluation the two cases might be merged at a later stage, but should be kept separated for now. ]] local function has_accept_as_written (str, allow_empty) local count; if true == allow_empty then str, count = str:gsub ('^%(%((.*)%)%)$', '%1'); -- allows (()) to be an empty set else str, count = str:gsub ('^%(%((.+)%)%)$', '%1'); end return str, 0 ~= count; end --[[--------------------------< I S _ S E T >------------------------------------------------------------------ Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set (var) return not (var == nil or var == ''); end --[[--------------------------< S U B S T I T U T E >---------------------------------------------------------- Populates numbered arguments in a message string using an argument table. ]] local function substitute (msg, args) return args and mw.message.newRawMessage (msg, args):plain() or msg; end --[[--------------------------< E R R O R _ C O M M E N T >---------------------------------------------------- Wraps error messages with CSS markup according to the state of hidden. ]] local function error_comment (content, hidden) return substitute (hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content); end --[=[-------------------------< M A K E _ W I K I L I N K >---------------------------------------------------- Makes a wikilink; when both link and display text is provided, returns a wikilink in the form [[L|D]]; if only link is provided (or link and display are the same), returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an empty string. ]=] local function make_wikilink (link, display) if not is_set (link) then return '' end if is_set (display) and link ~= display then return table.concat ({'[[', link, '|', display, ']]'}); else return table.concat ({'[[', link, ']]'}); end end --[[--------------------------< S E T _ M E S S A G E >---------------------------------------------------------- Sets an error condition and returns the appropriate error message. The actual placement of the error message in the output is the responsibility of the calling function. TODO: change z.error_categories and z.maintenance_cats to have the form cat_name = true; to avoid dups without having to have an extra cat ]] local added_maint_cats = {} -- list of maintenance categories that have been added to z.maintenance_cats; TODO: figure out how to delete this table local function set_message (error_id, arguments, raw, prefix, suffix) local error_state = cfg.error_conditions[error_id]; prefix = prefix or ''; suffix = suffix or ''; if error_state == nil then error (cfg.messages['undefined_error'] .. ': ' .. error_id); -- because missing error handler in Module:Citation/CS1/Configuration elseif is_set (error_state.category) then if error_state.message then -- when error_state.message defined, this is an error message table.insert (z.error_categories, error_state.category); else if not added_maint_cats[error_id] then added_maint_cats[error_id] = true; -- note that we've added this category table.insert (z.maintenance_cats, substitute (error_state.category, arguments)); -- make cat name then add to table end return; -- because no message, nothing more to do end end local message = substitute (error_state.message, arguments); message = table.concat ( { message, ' (', make_wikilink ( table.concat ( { cfg.messages['help page link'], '#', error_state.anchor }), cfg.messages['help page label']), ')' }); z.error_ids[error_id] = true; if z.error_ids['err_citation_missing_title'] and -- if missing-title error already noted in_array (error_id, {'err_bare_url_missing_title', 'err_trans_missing_title'}) then -- and this error is one of these return '', false; -- don't bother because one flavor of missing title is sufficient end message = table.concat ({prefix, message, suffix}); if raw == true then return message, error_state.hidden; end return error_comment (message, error_state.hidden); end --[[-------------------------< I S _ A L I A S _ U S E D >----------------------------------------------------- This function is used by select_one() to determine if one of a list of alias parameters is in the argument list provided by the template. Input: args – pointer to the arguments table from calling template alias – one of the list of possible aliases in the aliases lists from Module:Citation/CS1/Configuration index – for enumerated parameters, identifies which one enumerated – true/false flag used to choose how enumerated aliases are examined value – value associated with an alias that has previously been selected; nil if not yet selected selected – the alias that has previously been selected; nil if not yet selected error_list – list of aliases that are duplicates of the alias already selected Returns: value – value associated with alias we selected or that was previously selected or nil if an alias not yet selected selected – the alias we selected or the alias that was previously selected or nil if an alias not yet selected ]] local function is_alias_used (args, alias, index, enumerated, value, selected, error_list) if enumerated then -- is this a test for an enumerated parameters? alias = alias:gsub ('#', index); -- replace '#' with the value in index else alias = alias:gsub ('#', ''); -- remove '#' if it exists end if is_set (args[alias]) then -- alias is in the template's argument list if value ~= nil and selected ~= alias then -- if we have already selected one of the aliases local skip; for _, v in ipairs (error_list) do -- spin through the error list to see if we've added this alias if v == alias then skip = true; break; -- has been added so stop looking end end if not skip then -- has not been added so table.insert (error_list, alias); -- add error alias to the error list end else value = args[alias]; -- not yet selected an alias, so select this one selected = alias; end end return value, selected; -- return newly selected alias, or previously selected alias end --[[--------------------------< A D D _ M A I N T _ C A T >------------------------------------------------------ Adds a category to z.maintenance_cats using names from the configuration file with additional text if any. To prevent duplication, the added_maint_cats table lists the categories by key that have been added to z.maintenance_cats. ]] local function add_maint_cat (key, arguments) if not added_maint_cats [key] then added_maint_cats [key] = true; -- note that we've added this category table.insert( z.maintenance_cats, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table end end --[[--------------------------< A D D _ P R O P _ C A T >-------------------------------------------------------- Adds a category to z.properties_cats using names from the configuration file with additional text if any. ]] local added_prop_cats = {} -- list of property categories that have been added to z.properties_cats local function add_prop_cat (key, arguments) if not added_prop_cats [key] then added_prop_cats [key] = true; -- note that we've added this category table.insert( z.properties_cats, substitute (cfg.prop_cats [key], arguments)); -- make name then add to table end end --[[--------------------------< S A F E _ F O R _ I T A L I C S >---------------------------------------------- Protects a string that will be wrapped in wiki italic markup '' ... '' Note: We cannot use <i> for italics, as the expected behavior for italics specified by ''...'' in the title is that they will be inverted (i.e. unitalicized) in the resulting references. In addition, <i> and '' tend to interact poorly under Mediawiki's HTML tidy. ]] local function safe_for_italics (str) if not is_set (str) then return str end if str:sub (1, 1) == "'" then str = "<span></span>" .. str; end if str:sub (-1, -1) == "'" then str = str .. "<span></span>"; end -- Remove newlines as they break italics. return str:gsub ('\n', ' '); end --[[--------------------------< W R A P _ S T Y L E >---------------------------------------------------------- Applies styling to various parameters. Supplied string is wrapped using a message_list configuration taking one argument; protects italic styled parameters. Additional text taken from citation_config.presentation - the reason this function is similar to but separate from wrap_msg(). ]] local function wrap_style (key, str) if not is_set (str) then return ""; elseif in_array (key, {'italic-title', 'trans-italic-title'}) then str = safe_for_italics (str); end return substitute (cfg.presentation[key], {str}); end --[[--------------------------< M A K E _ S E P _ L I S T >------------------------------------------------------------ make a separated list of items using provided separators. <sep_list> - typically '<comma><space>' <sep_list_pair> - typically '<space>and<space>' <sep_list_end> - typically '<comma><space>and<space>' or '<comma><space>&<space>' defaults to cfg.presentation['sep_list'], cfg.presentation['sep_list_pair'], and cfg.presentation['sep_list_end'] if <sep_list_end> is specified, <sep_list> and <sep_list_pair> must also be supplied ]] local function make_sep_list (count, list_seq, sep_list, sep_list_pair, sep_list_end) local list = ''; if not sep_list then -- set the defaults sep_list = cfg.presentation['sep_list']; sep_list_pair = cfg.presentation['sep_list_pair']; sep_list_end = cfg.presentation['sep_list_end']; end if 2 >= count then list = table.concat (list_seq, sep_list_pair); -- insert separator between two items; returns list_seq[1] then only one item elseif 2 < count then list = table.concat (list_seq, sep_list, 1, count - 1); -- concatenate all but last item with plain list separator list = table.concat ({list, list_seq[count]}, sep_list_end); -- concatenate last item onto end of <list> with final separator end return list; end --[[--------------------------< S E L E C T _ O N E >---------------------------------------------------------- Chooses one matching parameter from a list of parameters to consider. The list of parameters to consider is just names. For parameters that may be enumerated, the position of the numerator in the parameter name is identified by the '#' so |author-last1= and |author1-last= are represented as 'author-last#' and 'author#-last'. Because enumerated parameter |<param>1= is an alias of |<param>= we must test for both possibilities. Generates an error if more than one match is present. ]] local function select_one (args, aliases_list, error_condition, index) local value = nil; -- the value assigned to the selected parameter local selected = ''; -- the name of the parameter we have chosen local error_list = {}; if index ~= nil then index = tostring(index); end for _, alias in ipairs (aliases_list) do -- for each alias in the aliases list if alias:match ('#') then -- if this alias can be enumerated if '1' == index then -- when index is 1 test for enumerated and non-enumerated aliases value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- first test for non-enumerated alias end value, selected = is_alias_used (args, alias, index, true, value, selected, error_list); -- test for enumerated alias else value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- test for non-enumerated alias end end if #error_list > 0 and 'none' ~= error_condition then -- for cases where this code is used outside of extract_names() for i, v in ipairs (error_list) do error_list[i] = wrap_style ('parameter', v); end table.insert (error_list, wrap_style ('parameter', selected)); table.insert (z.message_tail, {set_message (error_condition, {make_sep_list (#error_list, error_list)}, true)}); end return value, selected; end --[=[-------------------------< R E M O V E _ W I K I _ L I N K >---------------------------------------------- Gets the display text from a wikilink like [[A|B]] or [[B]] gives B The str:gsub() returns either A|B froma [[A|B]] or B from [[B]] or B from B (no wikilink markup). In l(), l:gsub() removes the link and pipe (if they exist); the second :gsub() trims whitespace from the label if str was wrapped in wikilink markup. Presumably, this is because without wikimarkup in str, there is no match in the initial gsub, the replacement function l() doesn't get called. ]=] local function remove_wiki_link (str) return (str:gsub ("%[%[([^%[%]]*)%]%]", function(l) return l:gsub ("^[^|]*|(.*)$", "%1" ):gsub ("^%s*(.-)%s*$", "%1"); end)); end --[=[-------------------------< I S _ W I K I L I N K >-------------------------------------------------------- Determines if str is a wikilink, extracts, and returns the wikilink type, link text, and display text parts. If str is a complex wikilink ([[L|D]]): returns wl_type 2 and D and L from [[L|D]]; if str is a simple wikilink ([[D]]) returns wl_type 1 and D from [[D]] and L as empty string; if not a wikilink: returns wl_type 0, str as D, and L as empty string. trims leading and trailing whitespace and pipes from L and D ([[L|]] and [[|D]] are accepted by MediaWiki and treated like [[D]]; while [[|D|]] is not accepted by MediaWiki, here, we accept it and return D without the pipes). ]=] local function is_wikilink (str) local D, L local wl_type = 2; -- assume that str is a complex wikilink [[L|D]] if not str:match ('^%[%[[^%]]+%]%]$') then -- is str some sort of a wikilink (must have some sort of content) return 0, str, ''; -- not a wikilink; return wl_type as 0, str as D, and empty string as L end L, D = str:match ('^%[%[([^|]+)|([^%]]+)%]%]$'); -- get L and D from [[L|D]] if not is_set (D) then -- if no separate display D = str:match ('^%[%[([^%]]*)|*%]%]$'); -- get D from [[D]] or [[D|]] wl_type = 1; end D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters return wl_type, D, L or ''; end --[[--------------------------< S T R I P _ A P O S T R O P H E _ M A R K U P >-------------------------------- Strip wiki italic and bold markup from argument so that it doesn't contaminate COinS metadata. This function strips common patterns of apostrophe markup. We presume that editors who have taken the time to markup a title have, as a result, provided valid markup. When they don't, some single apostrophes are left behind. Returns the argument without wiki markup and a number; the number is more-or-less meaningless except as a flag to indicate that markup was replaced; do not rely on it as an indicator of how many of any kind of markup was removed; returns the argument and nil when no markup removed ]] local function strip_apostrophe_markup (argument) if not is_set (argument) then return argument, nil; -- no argument, nothing to do end if nil == argument:find ( "''", 1, true ) then -- Is there at least one double apostrophe? If not, exit. return argument, nil; end local flag; while true do if argument:find ("'''''", 1, true) then -- bold italic (5) argument, flag = argument:gsub ("%'%'%'%'%'", ""); -- remove all instances of it elseif argument:find ("''''", 1, true) then -- italic start and end without content (4) argument, flag=argument:gsub ("%'%'%'%'", ""); elseif argument:find ("'''", 1, true) then -- bold (3) argument, flag=argument:gsub ("%'%'%'", ""); elseif argument:find ("''", 1, true) then -- italic (2) argument, flag = argument:gsub ("%'%'", ""); else break; end end return argument, flag; -- done end --[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >-------------------------------------- Sets local cfg table to same (live or sandbox) as that used by the other modules. ]] local function set_selected_modules (cfg_table_ptr) cfg = cfg_table_ptr; end --[[--------------------------< E X P O R T S >---------------------------------------------------------------- ]] return { add_maint_cat = add_maint_cat, -- exported functions add_prop_cat = add_prop_cat, error_comment = error_comment, first_set = first_set, has_accept_as_written = has_accept_as_written, in_array = in_array, is_set = is_set, is_url = is_url, is_wikilink = is_wikilink, make_sep_list = make_sep_list, make_wikilink = make_wikilink, remove_wiki_link = remove_wiki_link, safe_for_italics = safe_for_italics, select_one = select_one, set_error = set_error, set_message = set_message, set_selected_modules = set_selected_modules, substitude = substitude, split_url = split_url, strip_apostrophe_markup = strip_apostrophe_markup, substitute = substitute, wrap_style = wrap_style, z = z, -- exported table } 70e48f7c74da128a1aec2c6b20cf1227b819d92e File:OCTONAUTS.png 6 27 40 2022-09-24T01:28:08Z Richard Robin 2 海底小纵队LOGO wikitext text/x-wiki == 摘要 == 海底小纵队LOGO == 许可协议 == {{Copyright}} e6de925649728b2d982e5f6ecbe581fede4f4ff0 Template:Ruby 10 28 42 2022-09-24T02:05:23Z Richard Robin 2 创建页面,内容为“<ruby {{#if:{{{class|}}}|class="{{{class|}}}"}} {{#if:{{{id|}}}|id="{{{id|}}}"}} {{#if:{{{style|{{{css|}}}}}}|style="{{{style|{{{css|}}}}}}"}}><rb {{#if:{{{rbclass|}}}|class="{{{rbclass|}}}"}} {{#if:{{{rbid|}}}|id="{{{rbid|}}}"}} {{#if:{{{rbsize|}}}|style="font-size:{{{rbsize|}}}"}}>{{#if:{{{3|}}}|{{lang|{{{3}}}|{{{1}}}}}|{{{1}}}}}</rb><rp>(</rp><rt {{#if:{{{rtclass|}}}|class="{{{rtclass|}}}"}} {{#if:{{{rtid|}}}|id="{{{rtid|}}}"}} style="font-size:{{{rtsize|0…” wikitext text/x-wiki <ruby {{#if:{{{class|}}}|class="{{{class|}}}"}} {{#if:{{{id|}}}|id="{{{id|}}}"}} {{#if:{{{style|{{{css|}}}}}}|style="{{{style|{{{css|}}}}}}"}}><rb {{#if:{{{rbclass|}}}|class="{{{rbclass|}}}"}} {{#if:{{{rbid|}}}|id="{{{rbid|}}}"}} {{#if:{{{rbsize|}}}|style="font-size:{{{rbsize|}}}"}}>{{#if:{{{3|}}}|{{lang|{{{3}}}|{{{1}}}}}|{{{1}}}}}</rb><rp>(</rp><rt {{#if:{{{rtclass|}}}|class="{{{rtclass|}}}"}} {{#if:{{{rtid|}}}|id="{{{rtid|}}}"}} style="font-size:{{{rtsize|0.75em}}}">{{#if:{{{4|}}}|{{lang|{{{4}}}|{{{2}}}}}|{{#if:{{{3|}}}|{{lang|{{{3}}}|{{{2}}}}}|{{{2}}}}}}}</rt><rp>)</rp></ruby><noinclude> {{Documentation}} [[Category:格式模板]] </noinclude> 2467ef477ad43c60db0674d5cda7b474a39643d2 Template:Lang 10 29 43 2022-09-24T02:06:55Z Richard Robin 2 创建页面,内容为“<span lang="{{lc:{{{1}}}}}" xml:lang="{{lc:{{{1}}}}}">{{#switch:{{lc:{{{1|}}}}} |zh|gan|zh-yue = {{{2}}} |jp|jap = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[日語]]請使用'''ja'''</span> |gr = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[希臘語]]請使用'''el'''或'''gre'''</span> |kr = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[朝鮮語]…” wikitext text/x-wiki <span lang="{{lc:{{{1}}}}}" xml:lang="{{lc:{{{1}}}}}">{{#switch:{{lc:{{{1|}}}}} |zh|gan|zh-yue = {{{2}}} |jp|jap = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[日語]]請使用'''ja'''</span> |gr = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[希臘語]]請使用'''el'''或'''gre'''</span> |kr = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[朝鮮語]]請使用'''ko'''或'''kor'''。kr為[[卡努里語]],如該語言條目已建立,請至[[Template talk:Lang]]回報取消此警告。</span> |kp = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[朝鮮語]]請使用'''ko'''或'''kor'''</span> |po = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[波蘭語]]請使用'''pl'''或'''pol'''</span> |sp = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[西班牙語]]請使用'''es'''或'''spa'''</span> |cz = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[捷克語]]請使用'''cs'''或'''cze'''</span> |kz = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[哈薩克語]]請使用'''kk'''或'''kaz'''</span> |dk = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:[[丹麥語]]請使用'''da'''</span> |unicode|ipa = -{{{{2}}}}-<span class="error" style="font-size:smaller;">模板參數錯誤:請檢查更正引用語言代碼</span> |#default = {{{2}}}}}</span>{{#switch:{{{1|}}} |ar|fa|he|ps|ur = &#8206; |#default = }}{{#if:{{NAMESPACE}}| <!-- |[[Category:含有{{#switch:{{lc:{{{1|}}}}} |ar = 阿拉伯語 |en|eng = 英語 |es = 西班牙語 |de = 德語 |fr = 法語 |ja|jp|jap= 日語 |bg = 保加利亞語 |cs = 捷克語 |da = 丹麥語 |nl = 荷蘭語 |et = 愛沙尼亞語 |fi = 芬蘭語 |el|gre = 希臘語 |hu = 匈牙利語 |ga = 愛爾蘭語 |grc = 古希臘語 |la|lat = 拉丁語 |cy = 威爾斯語 |sl|slv = 斯洛維尼亞語 |zh-yue|yue|zh-hk = 粵語 |zh|zh-hans|zh-hant|zh-cn|zh-tw|zh-sg = 明確引用中文 |#default = {{#ifexist:Category:含有{{ISO 639 name {{lc:{{{1|}}}}}}}的條目 |{{ISO 639 name {{lc:{{{1|}}}}}}} |非中文內容 }} }}的條目]] --> }}<noinclude>{{documentation}}</noinclude> ee207b57e677adb3441ddce5e5e402b27c770a59 Template:Namespace detect 10 30 44 2022-09-24T02:09:48Z Richard Robin 2 创建页面,内容为“{{#switch: {{lc: <!--Lower case the result--> <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{{demospace}}} | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | talk | {{NAMESPACE}} }} }} }} }} | main = {{{main| {{{other|}}} }}} | talk = {{{talk| {{{other|}}} }}} | user = {{{user| {{{other|}}}…” wikitext text/x-wiki {{#switch: {{lc: <!--Lower case the result--> <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{{demospace}}} | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | talk | {{NAMESPACE}} }} }} }} }} | main = {{{main| {{{other|}}} }}} | talk = {{{talk| {{{other|}}} }}} | user = {{{user| {{{other|}}} }}} | 森川wiki = {{{森川wiki| {{{other|}}} }}} | image = {{{image| {{{other|}}} }}} | mediawiki = {{{mediawiki| {{{other|}}} }}} | template = {{{template| {{{other|}}} }}} | help = {{{help| {{{other|}}} }}} | category = {{{category| {{{other|}}} }}} | widget = {{{widget| {{{other|}}} }}} | other | #default = {{{other|}}} }}<!--End switch--><noinclude> {{Documentation}} [[Category:元模板]]</noinclude> b49bfc70715a027b57c8488071313389ba464ec5 File:OtherWiki-gray-large.svg 6 31 45 2022-09-24T02:16:16Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Cc-by}} 514943f4dd3c532f9d14962ad9fbb5a920a9dd4b Template:Tl 10 32 46 2022-09-24T02:22:58Z Richard Robin 2 创建页面,内容为“&#123;&#123;{{ {{{|safesubst:}}}#if:{{{3|}}}|{{{3|}}}:|}}[[{{ {{{|safesubst:}}}ns:Template}}:{{{1}}}|{{{1}}}]]{{ {{{|safesubst:}}}#if:{{{2|{{{arg|}}}}}}|{{!}}{{{2|{{{arg}}}}}}}}&#125;&#125;<noinclude> {{Documentation}} <!-- 請在將分類與跨語言連結增加在 /doc 子頁面 --> [[Category:内部链接模板]] </noinclude>” wikitext text/x-wiki &#123;&#123;{{ {{{|safesubst:}}}#if:{{{3|}}}|{{{3|}}}:|}}[[{{ {{{|safesubst:}}}ns:Template}}:{{{1}}}|{{{1}}}]]{{ {{{|safesubst:}}}#if:{{{2|{{{arg|}}}}}}|{{!}}{{{2|{{{arg}}}}}}}}&#125;&#125;<noinclude> {{Documentation}} <!-- 請在將分類與跨語言連結增加在 /doc 子頁面 --> [[Category:内部链接模板]] </noinclude> 29c26cdb608bd3f5c96402ba4e0e3bef2a787f65 Template:Ruby/doc 10 33 47 2022-09-24T02:32:08Z Richard Robin 2 创建页面,内容为“注:本模板引自中文维基百科,按照知识共享 署名-相同方式共享 3.0协议之条款下引入。 <!-- 在本行下編輯模板說明 --> 本模板可產生{{Ruby|注|zhù}}{{Ruby|音|yīn}}的效果。 ==用法== <pre>{{Ruby|文字|注音|文字語言代碼|注音語言代碼}}</pre> 文字語言與注音語言為可選參數,不填注音語言時,注音語言與文字語言相同。 本模板全都是Help:模板#参数的定义…” wikitext text/x-wiki 注:本模板引自中文维基百科,按照知识共享 署名-相同方式共享 3.0协议之条款下引入。 <!-- 在本行下編輯模板說明 --> 本模板可產生{{Ruby|注|zhù}}{{Ruby|音|yīn}}的效果。 ==用法== <pre>{{Ruby|文字|注音|文字語言代碼|注音語言代碼}}</pre> 文字語言與注音語言為可選參數,不填注音語言時,注音語言與文字語言相同。 本模板全都是[[Help:模板#参数的定义和调用|编号参数]]。 本模板不可以對本身重複嵌套,會出錯。 各語言對應的代碼見維基百科的[[Wikipedia:en:ISO_639-1|ISO 639]]等條目。 == 範例 == {| class="wikitable" |- ! 代码 !! 效果 |- |<code><nowiki>{{Ruby|注|zhù}}{{Ruby|音|yīn}}</nowiki></code> || {{Ruby|注|zhù}}{{Ruby|音|yīn}} |- |<code><nowiki>{{Ruby|運命|さだめ|ja}}</nowiki></code> || {{Ruby|運命|さだめ|ja}} |- |<code><nowiki>{{Ruby|超電磁砲|レールガン|ja}}</nowiki></code> || {{Ruby|超電磁砲|レールガン|ja}} |- |<code><nowiki>{{Ruby|東方妖々夢|とうほうようようむ|ja}} 〜 {{Ruby|Perfect|パーフェクト|en|ja}} {{Ruby|Cherry|チェリー|en|ja}} {{Ruby|Blossom|ブロッサム|en|ja}}</nowiki></code> || {{Ruby|東方妖々夢|とうほうようようむ|ja}} 〜 {{Ruby|Perfect|パーフェクト|en|ja}} {{Ruby|Cherry|チェリー|en|ja}} {{Ruby|Blossom|ブロッサム|en|ja}} |} ==问题== 目前仅部分浏览器支持本模板的样式,使用前请注意您的浏览器的兼容性。如果您看到注音排在文字上面,那就说明您的浏览器兼容该样式。 参阅: * [http://caniuse.com/#feat=ruby ''Can I use...'' 上面的浏览器兼容性列表] * [https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/ruby Mozilla 开发者网站上面有关 <nowiki><ruby></nowiki> 的说明] Firefox 34~37 版可以打开 <code>about:config</code> 页面,把 <code>layout.css.ruby.enabled</code> 这个参数改成 <code>true</code> 来开启注音效果。 现象描述: 该模板在table、li等元素中使用会可能导致部分对齐方式上的问题,这是由于渲染方式上的问题。在列内元素数量不统一时不同的宽度分配方式会导致的高度分配不一(webkit会给块元素一个合理的空间)。这个问题只在宽度是自动分配的时候出现,如果宽度是被指定好的则不会出现这个问题。 这类问题在{{tl|LyricsKai}}等模板中也会发生,尤其是依赖table的各种模板。LyricsKai:左右两列中的对应行若不同时使用ruby,就会出现此类问题。 {| class="wikitable" |- ! 标题文字 !! 标题文字 !! 标题文字 |- | width=100px|100px宽度,换行时触发异常 || width=150px|150px宽度|| {{ruby|示例|test}}:ruby标签,自动调节宽度,显示异常,单元格会向上浮动若干像素 |- | 100px宽度 || {{ruby|示例|test}}:150px宽度,宽度被写死的情况下不会触发异常 || <div>套上了div标签之后,{{ruby|示例|test}}:ruby标签,自动调节宽度,显示正常</div> |} 解决方法: 在ruby外面套一个div标签。 <pre> {| class="wikitable" |- ! 标题文字 !! 标题文字 !! 标题文字 |- | width=100px|100px宽度,换行时触发异常 || width=150px|150px宽度|| {{ruby|示例|test}}:ruby标签,自动调节宽度,显示异常,单元格会向上浮动若干像素 |- | 100px宽度 || {{ruby|示例|test}}:150px宽度,宽度被写死的情况下不会触发异常 || <div>套上了div标签之后,{{ruby|示例|test}}:ruby标签,自动调节宽度,显示正常</div> |} </pre> == 参见 == *{{Tl|Lang}} *{{Tl|Rubyh}}——带有黑幕 *{{Tl|Ruby-begin}}——具有强大可定制性 <!-- 本行下加入模板的分類 --> <includeonly></includeonly> <noinclude>[[Category:模板說明文件]]</noinclude> f56e1389b696222dc612ecd4cd4392b46d5d995c Template:Lang/doc 10 34 48 2022-09-24T02:36:28Z Richard Robin 2 创建页面,内容为“本模板用於標示某段文字的語言。 == 用法 == <pre>{{Lang|語言代碼|文字}}</pre> 各語言對應的代碼見維基百科的[[Wikipedia:en:ISO_639-1|ISO 639]]等條目。 === 特別注意 === 本模板'''不应'''被用于防止普通简繁体转换。如果您仅希望处理繁体字而不是其他语言的文字,请使用'''<code><nowiki>-{ }-</nowiki></code>'''(详见[[Help:繁简转换]])。 在[[Help:表格|表格]]和其他的…” wikitext text/x-wiki 本模板用於標示某段文字的語言。 == 用法 == <pre>{{Lang|語言代碼|文字}}</pre> 各語言對應的代碼見維基百科的[[Wikipedia:en:ISO_639-1|ISO 639]]等條目。 === 特別注意 === 本模板'''不应'''被用于防止普通简繁体转换。如果您仅希望处理繁体字而不是其他语言的文字,请使用'''<code><nowiki>-{ }-</nowiki></code>'''(详见[[Help:繁简转换]])。 在[[Help:表格|表格]]和其他的塊級元素中不建議使用本模板,因為本模板是內聯元素。 == 範例 == <pre>{{Lang|ja|蓬莱山輝夜}}</pre> *有本模板時的效果:{{Lang|ja|蓬莱山輝夜}} *無本模板時的效果:蓬莱山輝夜 == 實現原理 == 使用了HTML lang屬性,{{参見|W3school在线教程的页面[http://www.w3school.com.cn/tags/att_standard_lang.asp HTML lang 属性]}}。 == 字体家族预置 == 当<code>语言代码</code>为以下这些值时,将会配合[[MediaWiki:Common.css|主站CSS样式]]应用相应语言的字体家族(<code>font-family</code>): * <code>zh-hant</code>[繁体中文]; * <code>zh-hans</code>[简体中文]; * <code>zh-CN</code>[中文(中国大陆)]; * <code>zh-HK</code>[中文(香港特别行政区)]; * <code>zh-TW</code>[中文(台湾地区)]; * <code>ja</code>[日文]; * <code>ko</code>[韩文]。 具体使用的字体家族详见[[MediaWiki:Common.css]]。 <!-- 本行下加入模板的分類 --> <includeonly>[[Category:语言模板]]</includeonly> <noinclude>[[Category:模板說明文件]]</noinclude> 9a5601bcedb9d7b6b73a7216934970aef37bf5a0 Module:Var 828 35 49 2022-09-24T03:39:35Z Richard Robin 2 创建页面,内容为“local frame = mw.getCurrentFrame() local module = { getPlain = function(key, type) if type then type = '_'..type else type = '' end return frame:callParserFunction("#var"..type, tostring(key)) end, set = function(key, val) frame:callParserFunction("#vardefine", tostring(key), tostring(val)) return val end } module.get = function(key, type) local val = module.getPlain(key, type) if val == '' then return nil end if val:find('^…” Scribunto text/plain local frame = mw.getCurrentFrame() local module = { getPlain = function(key, type) if type then type = '_'..type else type = '' end return frame:callParserFunction("#var"..type, tostring(key)) end, set = function(key, val) frame:callParserFunction("#vardefine", tostring(key), tostring(val)) return val end } module.get = function(key, type) local val = module.getPlain(key, type) if val == '' then return nil end if val:find('^0') then return val end if tonumber(val) then return tonumber(val) end if var == 'true' then return true end if var == 'false' then return false end return val end module.remove = function(key) local removedVal = module.getPlain(key) module.set(key, "") return removedVal end return module 4749da32fa1a32156e93738d7269e077ec759eb1 Help:简繁转换 12 37 51 2022-09-24T03:44:34Z Richard Robin 2 创建页面,内容为“'''繁简转换''',顾名思义,就是繁体中文与简体中文之间互相转换,从而将相应的语言变体的内容提供给对应的用户。比如,同一篇文章,中国内地(中国大陆)、新加坡和马来西亚的用户看到的就是简体中文,而港澳台的用户看到的就是繁体中文。 本页所说的繁简转换包括地区词的处理。对于同一个事物,简繁体用的词汇可能会不同。即使同为简…” wikitext text/x-wiki '''繁简转换''',顾名思义,就是繁体中文与简体中文之间互相转换,从而将相应的语言变体的内容提供给对应的用户。比如,同一篇文章,中国内地(中国大陆)、新加坡和马来西亚的用户看到的就是简体中文,而港澳台的用户看到的就是繁体中文。 本页所说的繁简转换包括地区词的处理。对于同一个事物,简繁体用的词汇可能会不同。即使同为简体中文或者同为繁体中文,不同地区的表述方式亦有不同。例如,同为简体中文,中国内地称“-{巴厘岛}-”,而新加坡和马来西亚则会称为“-{峇厘岛}-”。又如,繁体中文习惯表述的“-{二進位}-”,简体中文一般表述为“-{二进制}-”。 MediaWiki提供了一系列用于处理繁简转换的系统,并允许对特定内容进行手动转换。 本站在此基础上,设置了本地的转换规则,以转换滚动的天空游戏内的名称。例如,对于关卡“Matrix”,简体中文称为“-{矩阵浪潮}-”,而繁体中文称为“-{矩陣}-”,因此本站会在“-{矩阵浪潮}-”和“-{矩陣}-”之间进行转换。 == 语言变体 == 在MediaWiki,中文(zh)共有以下语言变体(language variants): {| class=wikitable ! 变体名称 !! 代码 !! 说明 |- | 中文 || zh || 不繁简转换 |- | ''繁体中文'' || zh-hant || 不建议使用,请使用具体的繁体 |- | 台湾繁体 || zh-tw || 台湾地区使用的繁体中文 |- | 香港繁体 || zh-hk || 香港使用的繁体中文 |- | 澳门繁体 || zh-mo || 澳门使用的繁体中文,从zh-hk中拆分 |- | ''简体中文'' || zh-hans || 不建议使用,请使用具体的简体 |- | 大陆简体 || zh-cn || 中国内地使用的简体中文 |- | 新加坡简体 || zh-sg || 新加坡使用的简体中文 |- | 大马简体 || zh-my || 马来西亚使用的简体中文,从zh-my中拆分 |} === 内容语言变体 === 显示页面文章内容时使用的语言变体。注意:如果页面语言不是“中文”(即使是中文的某个变体),则该页面不会存在语言变体,进而没有繁简转换。 设置内容语言变体的方法:对于Timeless皮肤,可以点击文章部分右上角的“{{int:variants}}”(一般位于“{{int:edit}}”、“{{int:history}}”和“{{int:purge}}”后面)然后选择语言变体。对于Vector皮肤,点击“{{int:navigation-heading}}”中的语言变体名称(位于“{{int:nstab-main}}”、“{{int:talk}}”右侧)。如果指定的地方找不到按钮,说明该页面不支持繁简转换。 内容的语言变体不建议设为“中文(不转换)”“简体中文”或者“繁体中文”,你应当选择更加具体的语言变体。 已登录的用户可以在[[Special:偏好設定]]中选择不同的中文语言。URL中的<code>variant</code>参数可用于强制修改内容的语言变体。 === 界面语言 === 界面语言是独立于文章内容使用的语言变体的,可不限于中文。已登录用户可以在[[Special:参数设置]]中选择默认的界面语言。URL中的<code>uselang</code>参数可用于强制修改界面语言。 == 转换规则 == 目前共有四层转换规则,以对页面内容进行转换(参照中文维基百科)。 === 第一层:MediaWiki的内置转换表 === MediaWiki内置的转换表位于[[w:phab:source/mediawiki/browse/master/languages/data/ZhConversion.php]],该表规定了所有使用MediaWiki软件的网站都会应用的转换规则。该转换表规定了基本的简繁体转换,以及大陆简体、香港繁体、台湾繁体特殊的转换,没有为新加坡、马来的简体和澳门的繁体设置特别的转换规则。 === 第二层:站点转换表 === 站点转换表是用于本站的繁简转换表,由[[MediaWiki:Conversiontable]]的子页面定义。子页面名称为语言变体代码,例如[[MediaWiki:Conversiontable/zh-hant]]表示“转换为繁体中文的转换表”。本站的转换表具体包括: {{Special:PrefixIndex/MediaWiki:Conversiontable/}} 为方便显示,每条对应前可加星号(*)或井号(#),可用“//”加写注释,注意每条转换关系要以“;”终止。 与滚动的天空有关的转换规则就是在站点转换表定义的,因此这些转换对本站的所有页面都有效。 === 第三层:公共转换组 === {{seealso|Template:NoteTA|Module:CGroup}} 公共转换组是指多个页面共用的一套转换规则,但不是所有页面都要应用这一套转换规则。例如,在与MediaWiki有关的页面,繁体中文“-{使用者}-”对应简体中文“-{用户}-”,繁体中文“-{偏好設定}-”对应简体中文“-{参数设置}-”,但是在并非与MediaWiki有关的地方不需要这些转换。 公共转换组是通过模块在页面内定义<code><nowiki>-{H|</nowiki>一条转换规则-{}-<nowiki>}-</nowiki></code>实现的,其本质实际上属于隐藏手工转换。 公共转换组是在[[Module:CGroup]]的子页面定义的。如需在在页面使用一个公共转换组,可以使用{{tl|NoteTA}}模板。具体请参考该模块和模板的文档。 === 第四层:手工转换 === {{主条目|#手工转换}} 你可以在特定的地方指定一部分文字如何转换,或者不进行转换。 == 语言变体回落 == 语言变体回落(language variant fallback)是指如果查不到某个变体语言的规则,则会尝试查询另一个变体语言的规则。例如,显示澳门繁体(zh-mo)时,如果没有对应的规则,则会依次尝试使用繁体(zh-hant)、香港繁体(zh-hk)和台湾繁体(zh-tw)的转换规则。 MediaWiki规定的回落规则如下: {| class=wikitable ! 语言变体 !! 回落语言变体 |- | 中文(未转换) || 简体、繁体、大陆简体、台湾繁体、香港繁体、新加坡简体、澳门繁体、大马简体 |- | 简体 || 大陆简体、新加坡简体、大马简体 |- | 繁体 || 台湾繁体、香港繁体、澳门繁体 |- | 大陆简体 || 简体、新加坡简体、大马简体 |- | 新加坡简体 || 简体、大陆简体、大马简体 |- | 大马简体 || 简体、新加坡简体、大陆简体 |- | 台湾繁体 || 繁体、香港繁体、澳门繁体 |- | 香港繁体 || 繁体、澳门繁体、台湾繁体 |- | 澳门繁体 || 繁体、香港繁体、台湾繁体 |} 以新加坡简体为例,新加坡简体的回落规则为简体、大陆简体、大马简体,因此, * <code><nowiki>-{zh-hans:使用简体; zh-cn:使用大陆简体; zh-my: 使用大马简体; zh-hant: 使用繁體;}-</nowiki></code>在新加坡简体下显示为:“-{使用简体}-”。 * <code><nowiki>-{zh-cn:使用大陆简体; zh-my: 使用大马简体; zh-hant: 使用繁體;}-</nowiki></code>在新加坡简体下显示为:“-{使用大陆简体}-”。 * <code><nowiki>-{zh-my: 使用大马简体; zh-hant: 使用繁體;}-</nowiki></code>在新加坡简体下显示为:“-{使用大马简体}-”。 * <code><nowiki>-{zh-hant: 使用繁體;}-</nowiki></code>在新加坡简体下显示为:“<span class=error>在手动语言转换规则中检测到错误</span>”,因为没有可以回落的语言变体所以显示错误了。 * <code><nowiki>-{H|zh-hans:使用简体; zh-cn:使用大陆简体; zh-my: 使用大马简体; zh-hant: 使用繁體;}-使用繁體</nowiki></code>显示为:“-{使用简体}-” * <code><nowiki>-{H|zh-cn:使用大陆简体; zh-my: 使用大马简体; zh-hant: 使用繁體;}-使用繁體</nowiki></code>显示为:“-{使用大陆简体}-” * <code><nowiki>-{H|zh-my: 使用大马简体; zh-hant: 使用繁體;}-使用繁體</nowiki></code>显示为:“-{使用大马简体}-” * <code><nowiki>-{H|zh-hant: 使用繁體;}-使用繁體</nowiki></code>显示为:“-{使用繁体}-”(因为这条规则没有回落,所以忽略了这条规则而是使用了默认转换规则) == 手工转换 == 手工转换是指规定一部分内容的繁简转换方式,而忽略其他转换规则。其语法如下: === 不转换特定内容 === 可以使用<code><nowiki>-{不转换的内容}-</nowiki></code>来'''指定一部分内容不被转换'''。这部分内容将会忽略繁简转换。 例如: * <code><nowiki>无论你是设置的什么语言,引号中的这个“-{矩阵}-”总是显示为简体,而“-{亡靈之舞}-”总是显示为繁体。</nowiki></code> ** 效果:无论你是设置的什么语言,引号中的这个“-{矩阵}-”总是显示为简体,而“-{亡靈之舞}-”总是显示为繁体。 这种语法还可以用来'''切断用词识别'''。例如,繁体中文下的“-{矩陣}-”对应简体中文“-{矩阵浪潮}-”,但是“<code><nowiki>矩-{}-陣</nowiki></code>”转换为简体就是简单的“-{矩阵}-”,而不是“-{矩阵浪潮}-”。 === 手工转换特定内容 === 可以使用<code><nowiki>-{转换规则}-</nowiki></code>来'''手动指定转换规则''',例如: * <code><nowiki>-{zh:文字1;zh-hans:文字2;zh-hant:文字3;zh-cn:文字4;zh-tw:文字5;zh-hk:文字6;zh-sg:文字7;zh-mo:文字8;zh-my:文字9;}-</nowiki></code> 当前显示为:-{zh:文字1;zh-hans:文字2;zh-hant:文字3;zh-cn:文字4;zh-tw:文字5;zh-hk:文字6;zh-sg:文字7;zh-mo:文字8;zh-my:文字9;}-。 根据转换规则的回落规则,你不需要指定完整的转换规则,通常只需要指定简繁体即可。例如: * <code><nowiki>-{zh-hans:文字2;zh-hant:文字3}-</nowiki></code> 当前显示为:-{zh-hans:文字2;zh-hant:文字3}- 如果需要避免识别为转换规则,可以使用<code><nowiki>-{R|文本}-</nowiki></code>。 === 手工全文转换 === <code><nowiki>-{A|转换规则}-</nowiki></code>用于呈现指定内容的同时,'''给全文应用这条转换规则'''。 例如: <code><nowiki>-{A|zh-cn:博客; zh-hk:網誌; zh-tw:部落格;}-、博客、網誌、部落格</nowiki></code> 在不同语言下分别显示为: {| class=wikitable |- |- | 不转换 | -{博客、博客、網誌、部落格}- |- | 简体 | -{博客、博客、网志、部落格}- |- | 繁体 | -{部落格、博客、網誌、部落格}- |- | 大陆简体 | -{博客、博客、博客、博客}- |- | 香港繁体 | -{網誌、網誌、網誌、網誌}- |- | 澳门繁体 | -{網誌、網誌、網誌、網誌}- |- | 新加坡简体 | -{博客、博客、博客、博客}- |- | 大马简体 | -{博客、博客、博客、博客}- |- | 台湾繁体 | -{部落格、部落格、部落格、部落格}- |} <code><nowiki>-{H|转换规则}-</nowiki></code>与上述类似,但是在代码出现的地方不会产生转换后的文字,称为隐藏式全文手工转换。{{tl|NoteTA}}就是通过这种方法实现的。 例如: <code><nowiki>-{H|zh-cn:博客; zh-hk:網誌; zh-tw:部落格;}-博客、網誌、部落格</nowiki></code> 在不同语言下分别显示为: {| class=wikitable | 不转换 || -{博客、網誌、部落格}- |- | 简体 || -{博客、网志、部落格}- |- | 繁体 || -{博客、網誌、部落格}- |- | 大陆简体 || -{博客、博客、博客}- |- | 香港繁体 || -{網誌、網誌、網誌}- |- | 澳门繁体 || -{網誌、網誌、網誌}- |- | 新加坡简体 || -{博客、博客、博客}- |- | 大马简体 || -{博客、博客、博客}- |- | 台湾繁体 || -{部落格、部落格、部落格}- |} 此外,{{nowiki|__NOCC__}}或{{nowiki|__NOCONTENTCONVERT__}}魔术字可用于禁止全文繁简转换。 === 全文删除转换规则 === <code><nowiki>-{-|转换规则}-</nowiki></code>可用于让'''全文不应用某条转换规则'''。这种用法也是隐藏式的,代码出现的地方不会产生文字。 === 条目标题手工转换 === <code><nowiki>-{T|标题内容}-</nowiki></code>或者<code><nowiki>-{T|转换规则}-</nowiki></code>可以'''为文章标题应用转换规则'''。 此外,{{nowiki|__NOTC__}}或者{{nowiki|__NOTITLECONVERT__}}魔术字可用于禁止标题繁简转换。 === 描述转换规则 === <code><nowiki>-{D|转换规则}-</nowiki></code>可产生一段以各语言变体'''描述一条转换规则'''的文字。例如: * <code><nowiki>-{D|文字}-</nowiki></code>当前显示为: ** -{D|文字}- * <code><nowiki>-{D|zh-hans:文字2;zh-hant:文字3;}-</nowiki></code>当前显示为: ** -{D|zh-hans:文字2;zh-hant:文字3;}- * <code><nowiki>-{D|zh:文字1;zh-hans:文字2;zh-hant:文字3;zh-cn:文字4;zh-tw:文字5;zh-hk:文字6;zh-sg:文字7;zh-mo:文字8;zh-my:文字9;}-</nowiki></code>当前显示为: ** -{D|zh:文字1;zh-hans:文字2;zh-hant:文字3;zh-cn:文字4;zh-tw:文字5;zh-hk:文字6;zh-sg:文字7;zh-mo:文字8;zh-my:文字9;}- {{帮助页面}} [[Category:帮助页面]] 29d5320d3f84472ebb8331972c70bb94e20c7685 Help:繁简转换 12 38 52 2022-09-24T03:51:44Z Richard Robin 2 重定向页面至[[Help:简繁转换]] wikitext text/x-wiki #重定向 [[Help:简繁转换]] ed844987560c9149e9cc3f833fc183e40e9983dd File:海底小纵队主要成员.png 6 39 53 2022-09-24T03:54:07Z Richard Robin 2 海底小纵队主要成员 wikitext text/x-wiki == 摘要 == 海底小纵队主要成员 == 许可协议 == {{Copyright}} a45f1b5fc3799359c672b3691427f58746cb5e62 海底小纵队(团队) 0 40 56 2022-09-24T04:28:37Z Richard Robin 2 创建页面,内容为“[[File:海底小纵队主要成员.png|500px|缩略图|海底小纵队主干成员]] 海底小纵队是以巴克队长为领导核心,集结了医生、生物学家、摄像师、机械工程师等7名伙伴的小队。他们是一群活跃在海底的小小冒险家,有着各自的爱好与独特的特长,在团队核心巴克队长的带领下向着未知的海域不断探索前进。 == 成员 == === 主干成员 === *[[巴克队长]] *[[呱唧]] *…” wikitext text/x-wiki [[File:海底小纵队主要成员.png|500px|缩略图|海底小纵队主干成员]] 海底小纵队是以巴克队长为领导核心,集结了医生、生物学家、摄像师、机械工程师等7名伙伴的小队。他们是一群活跃在海底的小小冒险家,有着各自的爱好与独特的特长,在团队核心巴克队长的带领下向着未知的海域不断探索前进。 == 成员 == === 主干成员 === *[[巴克队长]] *[[呱唧]] *[[皮医生]](皮索) *[[谢灵通]] *[[达西西]] *[[章教授]] *[[突突兔]] === 外派员 === *[[帕尼]] *[[咔嚓船长]] *[[小敏]] *[[沼泽游侠]] *[[坦克]] *[[珍珠]] *[[纳克教授]] *[[瑞拉]] === 后勤 === *[[小萝卜]] [[分类:海底小纵队]][[分类:团队]][[分类:人物]] db46d8030f57d3f2521e373f0cd42bcffb6a4e80 海底小纵队(消歧义) 0 6 57 41 2022-09-24T04:29:49Z Richard Robin 2 wikitext text/x-wiki [[文件:OCTONAUTS.png|300px|居中]] 海底小纵队(Octonauts),可被解释为多篇文章: *如果你正在寻找由[[巴克队长]]为领导组成的团队,请进入[[海底小纵队(团队)]]。 *如果您在寻找《海底小纵队》绘本图书的介绍,请进入[[海底小纵队(原作绘本)]]。 *如果您在寻找《海底小纵队》动画剧集的介绍,请进入[[海底小纵队(动画剧集)]]。 **如果您在寻找《海底小纵队》动画剧集第一部的介绍,请进入[[海底小纵队动画(第一季)]]。 **如果您在寻找《海底小纵队》动画剧集第二部的介绍,请进入[[海底小纵队动画(第二季)]]。 **如果您在寻找《海底小纵队》动画剧集第三部的介绍,请进入[[海底小纵队动画(第三季)]]。 **如果您在寻找《海底小纵队》动画剧集第四部的介绍,请进入[[海底小纵队动画(第四季)]]。 **如果您在寻找《海底小纵队》动画剧集第五部的介绍,请进入[[海底小纵队动画(第五季)]]。 **如果您在寻找《海底小纵队》动画剧集第六部的介绍,请进入[[海底小纵队动画(第六季)]]。 **如果您在寻找《海底小纵队》动画剧集第七部的介绍,请进入[[海底小纵队动画(第七季)]]。 *如果您在寻找已于2021年在中国上映的电影的介绍,请进入[[海底小纵队大电影1:火焰之环]]。 *如果您在寻找已于2022年在中国上映的电影的介绍,请进入[[海底小纵队大电影2:洞穴大冒险]]。 c80ae1fff301b8dba47aa7b1e5ebe844732d2c5f 首页 0 2 58 54 2022-09-24T04:37:38Z Richard Robin 2 /* 更多内容您可以访问: */ 更新外部链接 wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 === 更多内容您可以访问: === [https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] [https://www.theoctonauts.com 海底小纵队英文官方网站] [https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] [https://weibo.com/u/5184055512 海底小纵队官方微博] [https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] [https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] [https://www.facebook.com/octonauts 海底小纵队官方脸书] [https://twitter.com/Octonauts 海底小纵队官方推特] [https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] bd375f3bb858bed693b2d0a2a891d225ef680fbb 75 58 2022-09-24T05:43:03Z Richard Robin 2 wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 === 索引 === *[[海底小纵队|海底小纵队是什么?]] *[[#分类:海底小纵队成员|海底小纵队成员]] === 更多内容您可以访问: === *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] b1d4165ef152aeb5af17d09458cfab27d981b60a 76 75 2022-09-24T05:44:04Z Richard Robin 2 wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 === 索引 === *[[海底小纵队|海底小纵队是什么?]] *[[Category:海底小纵队成员|海底小纵队成员]] === 更多内容您可以访问: === *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] 6b3e4434ebba334150fdb686a8d069081a9a9923 77 76 2022-09-24T05:45:29Z Richard Robin 2 增加阅读索引,方便浏览者使用 wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 === 索引 === *[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] === 更多内容您可以访问: === *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] 3cbf7debe8765f3f890df599a3722040f062a673 78 77 2022-09-24T06:05:44Z Richard Robin 2 /* 更多内容您可以访问: */ wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 === 索引 === *[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] === 更多内容您可以访问: === *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] b400bc6200cdafb5f0d9d04cfb51b8249fb88d78 84 78 2022-09-29T07:55:13Z Richard Robin 2 增加“友情链接”模块 wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 == 索引 == *[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] == 更多内容您可以访问: == *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] == 友情链接 == (敬请期待) 24411af3e521ec48b304023775b4b5dcdf4d40ae 98 84 2022-09-29T16:18:38Z Richard Robin 2 增加“工程”模块 wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 == 索引 == *[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] == 工程 == *[[海底小纵队维基:角色工程|角色工程]] *[[海底小纵队维基:角色工程|生物工程]] *[[海底小纵队维基:角色工程|动画工程]] *[[海底小纵队维基:角色工程|图书工程]] == 更多内容您可以访问: == *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] == 友情链接 == (敬请期待) 139daec27b1bc0d190092dd3d32104e609f9d248 99 98 2022-09-29T16:21:59Z Richard Robin 2 /* 工程 */ wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 == 索引 == *[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] == 工程 == *[[海底小纵队维基:角色工程|角色工程]] *[[海底小纵队维基:生物工程|生物工程]] *[[海底小纵队维基:动画工程|动画工程]] *[[海底小纵队维基:图书工程|图书工程]] == 更多内容您可以访问: == *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] == 友情链接 == (敬请期待) 15f43a205bf35808aba52029b290293aaddad9cc 101 99 2022-09-29T16:24:46Z Richard Robin 2 /* 索引 */ wikitext text/x-wiki <center><big><big>欢迎来到海底小纵队中文维基!</big></big></center> <center>Welcome to the Chinese Wiki of the Octonauts!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 == 索引 == *[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] *[https://octonauts.miraheze.org/wiki/Category:剧集 海底小纵队剧集] == 工程 == *[[海底小纵队维基:角色工程|角色工程]] *[[海底小纵队维基:生物工程|生物工程]] *[[海底小纵队维基:动画工程|动画工程]] *[[海底小纵队维基:图书工程|图书工程]] == 更多内容您可以访问: == *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] == 友情链接 == (敬请期待) b59386b76b04c77cbb79f9201586fa1f0b05b354 File:Captain Barnacles (Version 3).png 6 41 59 2022-09-24T04:39:27Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 巴克队长 0 42 60 2022-09-24T04:48:35Z Richard Robin 2 创建页面,内容为“[[File:Captain Barnacles (Version 3).png|缩略图|巴克队长]] '''巴克队长'''(Captain Barnacles)是一只北极熊,是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独一无二的才能。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://ww…” wikitext text/x-wiki [[File:Captain Barnacles (Version 3).png|缩略图|巴克队长]] '''巴克队长'''(Captain Barnacles)是一只北极熊,是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独一无二的才能。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 详细资料 == *性别:男 *物种:北极熊 *年龄:约35-40多岁 *职务:队长(船长) *别称:巴克、队长、小巴克、巴克舅舅(阿森和阿莎称呼) 关系:呱唧(同事)、皮索(同事)、谢灵通(同事)、突突兔(同事)章鱼堡(船)、坦克(同事)、纳克教授(老师)、巴卡(姐姐、同班同学)、阿森(外甥)、阿莎(外甥女) == 介绍 == 是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独特的才能。 非常强壮(皮索曾对队长说过:“快使用你的北极熊的力量!”),曾经两次公主抱过呱唧。喜欢拉手风琴,水平时好时坏。随身携带章鱼罗盘。 巴克是读解地图和图表的专家,探索未知海域和发现未知海洋生物是他保持旺盛精力的法宝。每当遇到追逐,需要不断的复杂的航行技巧时,此时此刻巴克队长一定在操作室掌舵。除优秀的领导才能之外,他也是小队中体格最健壮的一位,但队长并不适合像打包包裹之类的精细活。 [[分类:人物]][[分类:海底小纵队成员]][[分类:北极熊]] 9550119e34fdc46b82ac9ea9b164745e373494f3 88 60 2022-09-29T08:43:20Z Richard Robin 2 增加了信息栏,方便读者阅读。 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>巴克队长</big><br>Captain Barnacles | image = Captain Barnacles (Version 3).png | width = 300px | bgcolor = #ACD6FF | subtitle = }} {{Simpleboxdata|label=性别|data=男}} {{Simpleboxdata|label=物种|data=北极熊}} {{Simpleboxdata|label=颜色|data=白色和蓝色}} {{Simpleboxdata|label=职业|data=[[海底小纵队(团队)|海底小纵队]]队长}} {{Simpleboxdata|label=居住地|data=章鱼堡}} {{Simpleboxdata|label=最喜欢的舰艇|data=[[灯笼鱼艇]]}} {{Simpleboxdata|label=兄弟姐妹|data=[[巴卡]]}} {{Simpleboxdata|label=侄子|data=[[阿森]]}} {{Simpleboxdata|label=侄女|data=[[阿莎]]}} {{Simpleboxdata|label=朋友|data=[[Boris]], [[坦克]]}} {{Simpleboxdata|label=初次露面|data=[[鲸鲨]](英文版)<br>[[海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=[[Above and Beyond Season 2]]}} {{Simpleboxdata|label= 配音演员 |data=Simon Greenall<br> Ross Breen ([[海底报告]]演唱者)}} |} '''巴克队长'''(Captain Barnacles)是一只北极熊,是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独一无二的才能。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 详细资料 == *性别:男 *物种:北极熊 *年龄:约35-40多岁 *职务:队长(船长) *别称:巴克、队长、小巴克、巴克舅舅(阿森和阿莎称呼) 关系:呱唧(同事)、皮索(同事)、谢灵通(同事)、突突兔(同事)章鱼堡(船)、坦克(同事)、纳克教授(老师)、巴卡(姐姐、同班同学)、阿森(外甥)、阿莎(外甥女) == 介绍 == 是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独特的才能。 非常强壮(皮索曾对队长说过:“快使用你的北极熊的力量!”),曾经两次公主抱过呱唧。喜欢拉手风琴,水平时好时坏。随身携带章鱼罗盘。 巴克是读解地图和图表的专家,探索未知海域和发现未知海洋生物是他保持旺盛精力的法宝。每当遇到追逐,需要不断的复杂的航行技巧时,此时此刻巴克队长一定在操作室掌舵。除优秀的领导才能之外,他也是小队中体格最健壮的一位,但队长并不适合像打包包裹之类的精细活。 [[分类:人物]][[分类:海底小纵队成员]][[分类:北极熊]] 8959049e7ecb9c66df4d4f271c4913ca1e95f916 89 88 2022-09-29T08:53:45Z Richard Robin 2 修改部分链接 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>巴克队长</big><br>Captain Barnacles | image = Captain Barnacles (Version 3).png | width = 300px | bgcolor = #ACD6FF | subtitle = }} {{Simpleboxdata|label=性别|data=男}} {{Simpleboxdata|label=物种|data=北极熊}} {{Simpleboxdata|label=颜色|data=白色和蓝色}} {{Simpleboxdata|label=职业|data=[[海底小纵队(团队)|海底小纵队]]队长}} {{Simpleboxdata|label=居住地|data=章鱼堡}} {{Simpleboxdata|label=最喜欢的舰艇|data=[[灯笼鱼艇]]}} {{Simpleboxdata|label=兄弟姐妹|data=[[巴卡]]}} {{Simpleboxdata|label=侄子|data=[[阿森]]}} {{Simpleboxdata|label=侄女|data=[[阿莎]]}} {{Simpleboxdata|label=朋友|data=[[Boris]], [[坦克]]}} {{Simpleboxdata|label=初次露面|data=[[[[海底小纵队与鲸鲨|鲸鲨]]]](英文版)<br>[[[[海底小纵队与海底风暴|海底风暴]]]](中文版)}} {{Simpleboxdata|label=最近露面|data=[[Above and Beyond Season 2]]}} {{Simpleboxdata|label= 配音演员 |data=Simon Greenall<br> Ross Breen ([[海底报告]]演唱者)}} |} '''巴克队长'''(Captain Barnacles)是一只北极熊,是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独一无二的才能。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 详细资料 == *性别:男 *物种:北极熊 *年龄:约35-40多岁 *职务:队长(船长) *别称:巴克、队长、小巴克、巴克舅舅(阿森和阿莎称呼) 关系:呱唧(同事)、皮索(同事)、谢灵通(同事)、突突兔(同事)章鱼堡(船)、坦克(同事)、纳克教授(老师)、巴卡(姐姐、同班同学)、阿森(外甥)、阿莎(外甥女) == 介绍 == 是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独特的才能。 非常强壮(皮索曾对队长说过:“快使用你的北极熊的力量!”),曾经两次公主抱过呱唧。喜欢拉手风琴,水平时好时坏。随身携带章鱼罗盘。 巴克是读解地图和图表的专家,探索未知海域和发现未知海洋生物是他保持旺盛精力的法宝。每当遇到追逐,需要不断的复杂的航行技巧时,此时此刻巴克队长一定在操作室掌舵。除优秀的领导才能之外,他也是小队中体格最健壮的一位,但队长并不适合像打包包裹之类的精细活。 [[分类:人物]][[分类:海底小纵队成员]][[分类:北极熊]] a2089954c2d5181be9d21265234ac04788afc72c 90 89 2022-09-29T08:54:07Z Richard Robin 2 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>巴克队长</big><br>Captain Barnacles | image = Captain Barnacles (Version 3).png | width = 300px | bgcolor = #ACD6FF | subtitle = }} {{Simpleboxdata|label=性别|data=男}} {{Simpleboxdata|label=物种|data=北极熊}} {{Simpleboxdata|label=颜色|data=白色和蓝色}} {{Simpleboxdata|label=职业|data=[[海底小纵队(团队)|海底小纵队]]队长}} {{Simpleboxdata|label=居住地|data=章鱼堡}} {{Simpleboxdata|label=最喜欢的舰艇|data=[[灯笼鱼艇]]}} {{Simpleboxdata|label=兄弟姐妹|data=[[巴卡]]}} {{Simpleboxdata|label=侄子|data=[[阿森]]}} {{Simpleboxdata|label=侄女|data=[[阿莎]]}} {{Simpleboxdata|label=朋友|data=[[Boris]], [[坦克]]}} {{Simpleboxdata|label=初次露面|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>[[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=[[Above and Beyond Season 2]]}} {{Simpleboxdata|label= 配音演员 |data=Simon Greenall<br> Ross Breen ([[海底报告]]演唱者)}} |} '''巴克队长'''(Captain Barnacles)是一只北极熊,是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独一无二的才能。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 详细资料 == *性别:男 *物种:北极熊 *年龄:约35-40多岁 *职务:队长(船长) *别称:巴克、队长、小巴克、巴克舅舅(阿森和阿莎称呼) 关系:呱唧(同事)、皮索(同事)、谢灵通(同事)、突突兔(同事)章鱼堡(船)、坦克(同事)、纳克教授(老师)、巴卡(姐姐、同班同学)、阿森(外甥)、阿莎(外甥女) == 介绍 == 是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独特的才能。 非常强壮(皮索曾对队长说过:“快使用你的北极熊的力量!”),曾经两次公主抱过呱唧。喜欢拉手风琴,水平时好时坏。随身携带章鱼罗盘。 巴克是读解地图和图表的专家,探索未知海域和发现未知海洋生物是他保持旺盛精力的法宝。每当遇到追逐,需要不断的复杂的航行技巧时,此时此刻巴克队长一定在操作室掌舵。除优秀的领导才能之外,他也是小队中体格最健壮的一位,但队长并不适合像打包包裹之类的精细活。 [[分类:人物]][[分类:海底小纵队成员]][[分类:北极熊]] 62fb9bd0f12d0fb08d982d96aec5626f12d46e26 96 90 2022-09-29T10:51:13Z Richard Robin 2 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>巴克队长</big><br>Captain Barnacles | image = Captain Barnacles (Version 3).png | width = 300px | bgcolor = #ACD6FF | subtitle = }} {{Simpleboxdata|label=性别|data=男}} {{Simpleboxdata|label=物种|data=北极熊}} {{Simpleboxdata|label=颜色|data=白色和蓝色}} {{Simpleboxdata|label=职业|data=[[海底小纵队(团队)|海底小纵队]]队长}} {{Simpleboxdata|label=居住地|data=[[章鱼堡]]}} {{Simpleboxdata|label=最喜欢的舰艇|data=[[灯笼鱼艇]]}} {{Simpleboxdata|label=兄弟姐妹|data=[[巴卡]]}} {{Simpleboxdata|label=侄子|data=[[阿森]]}} {{Simpleboxdata|label=侄女|data=[[阿莎]]}} {{Simpleboxdata|label=朋友|data=Boris、[[坦克]]}} {{Simpleboxdata|label=初次露面|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>[[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=[[Above and Beyond Season 2]]}} {{Simpleboxdata|label= 配音演员 |data=Simon Greenall<br> Ross Breen ([[海底报告]]演唱者)}} |} '''巴克队长'''(Captain Barnacles)是一只北极熊,是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独一无二的才能。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 详细资料 == *性别:男 *物种:北极熊 *年龄:约35-40多岁 *职务:队长(船长) *别称:巴克、队长、小巴克、巴克舅舅(阿森和阿莎称呼) 关系:呱唧(同事)、皮索(同事)、谢灵通(同事)、突突兔(同事)章鱼堡(船)、坦克(同事)、纳克教授(老师)、巴卡(姐姐、同班同学)、阿森(外甥)、阿莎(外甥女) == 介绍 == 是小队里最勇敢、沉着冷静的一个,是小纵队引以为傲和值得信赖的队长。作为小队的核心人物和精神领袖,他的果敢决策激励着每一位成员——他们都为小队贡献出其独特的才能。 非常强壮(皮索曾对队长说过:“快使用你的北极熊的力量!”),曾经两次公主抱过呱唧。喜欢拉手风琴,水平时好时坏。随身携带章鱼罗盘。 巴克是读解地图和图表的专家,探索未知海域和发现未知海洋生物是他保持旺盛精力的法宝。每当遇到追逐,需要不断的复杂的航行技巧时,此时此刻巴克队长一定在操作室掌舵。除优秀的领导才能之外,他也是小队中体格最健壮的一位,但队长并不适合像打包包裹之类的精细活。 [[分类:人物]][[分类:海底小纵队成员]][[分类:北极熊]] 02ed7e9ab2b0b08902301dd2550f8d2df8054e83 File:Kwazii Cat 2.png 6 43 61 2022-09-24T04:51:34Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 呱唧 0 44 62 2022-09-24T04:53:25Z Richard Robin 2 创建页面,内容为“[[File:Kwazii Cat 2.png|缩略图|呱唧]] 呱唧(Kwazii)是一只冲动的橘色小猫,有过一段神秘的海盗生涯,他的爷爷是咔嚓船长。他性格豪放,常常会讲起自己曾经的海盗经历。若要问他从哪里来,你很可能被告知一个在地图上根本找不到的地方。那为何巴克队长还要任命这位有着可疑背景的海盗为小队中尉呢?<ref>{{cite web | title = 万达宝贝王 - 中文网…” wikitext text/x-wiki [[File:Kwazii Cat 2.png|缩略图|呱唧]] 呱唧(Kwazii)是一只冲动的橘色小猫,有过一段神秘的海盗生涯,他的爷爷是咔嚓船长。他性格豪放,常常会讲起自己曾经的海盗经历。若要问他从哪里来,你很可能被告知一个在地图上根本找不到的地方。那为何巴克队长还要任命这位有着可疑背景的海盗为小队中尉呢?<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:男 *物种:橘猫 *年龄:约30多岁 *职务:中尉 *别称:呱唧猫、呱唧叔叔 *关系:巴克队长(队长、搭档、伙伴)、皮索(同事)、突突兔(伙伴)、咔嚓船长(爷爷、偶像) == 介绍 == 容易冲动的小猫有过一段神秘的海盗生涯,他的爷爷是咔嚓船长。口头禅是“Yeow!”,坐骑是虎鲨艇(GUP-B),会撒娇、怕冷、怕痒、怕蜘蛛、他的尾巴很敏感。两次被巴克队长公主抱,一次被谢灵通公主抱。无论犯什么错队长都会原谅他。 他性格豪放,常常会讲起自己曾经的海盗经历。若要问他从哪里来,你很可能被告知一个在地图上根本找不到的地方。那为何巴克队长还要任命这位有着可疑背景的海盗为小队中尉呢? 但可以确定的是,呱唧是一只非常勇敢的小猫。他天生就是一个探险家,喜欢冒险和新鲜事物。作为海盗,他的动力更多地源自对探险的热爱,而不是对财宝的追求。每次探险,呱唧都会带着他的口头禅““yeow(呀哦)”一路活蹦乱跳,斗志昂扬。他把任何情形都变成了一次大胆冒险的机会。虽然他是只猫咪,但他从不吃鱼(毕竟这部动漫没有食物链这么一说,大家吃鱼饼干就能饱)。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:猫]] 023e0410e226d69755355690cfb36968974bd615 File:PesoPenguin.png 6 45 63 2022-09-24T05:00:57Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 皮医生 0 46 64 2022-09-24T05:03:00Z Richard Robin 2 创建页面,内容为“[[File:PesoPenguin.png|缩略图|皮医生]] 皮医生(Peso)名叫皮索,是一只可爱的企鹅,他是小队的医生,来自一个很大的企鹅家庭。他是小队中最年轻的成员。也常常把呱唧的吹牛皮当真。他不太喜欢吓人的情境(比如恐怖的船、黑漆漆的山洞),但是如果有人受伤或陷入麻烦,他会是小队中最勇敢的那个。宽广的心胸使他赢得了所有人的支持,无论是可…” wikitext text/x-wiki [[File:PesoPenguin.png|缩略图|皮医生]] 皮医生(Peso)名叫皮索,是一只可爱的企鹅,他是小队的医生,来自一个很大的企鹅家庭。他是小队中最年轻的成员。也常常把呱唧的吹牛皮当真。他不太喜欢吓人的情境(比如恐怖的船、黑漆漆的山洞),但是如果有人受伤或陷入麻烦,他会是小队中最勇敢的那个。宽广的心胸使他赢得了所有人的支持,无论是可怕的大型海洋动物还是小小的浮游生物。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:男 *物种:企鹅 *年龄:约18岁左右 *职务:医生 *别称:皮医生、小皮、皮皮 *关系:巴克队长(队长、信赖)、呱唧(同事)、宾托(弟弟) == 介绍 == 他是小队的医生,来自一个很大的企鹅家庭。他是小队中最年轻的成员。也常常把呱唧讲的传说当真。他不太喜欢吓人的情境(比如恐怖的船、黑漆漆的山洞),但是如果有人受伤或陷入麻烦,他会是小队中最勇敢的那个。宽广的心胸使他赢得了所有人的支持,无论是可怕的大型海洋动物还是小小的浮游生物。 他的勇气来自于一颗关爱别人的心。不过大家别被他暂且蹒跚的步态蒙骗了,当需要包扎时候,他的鳍会开足马力全速前进,他擅长包包裹、缠绷带、打结、解结,每次做这些事都会说:“嘿、嚓、呼、呀”可以在一秒内做好这些事。总之不管什么病都只需要缠绷带就可以治好。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:企鹅]] 83fe532985e2b8482e1945facd7889553ca5af09 File:Shellington .png 6 47 65 2022-09-24T05:11:06Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 谢灵通 0 48 66 2022-09-24T05:12:29Z Richard Robin 2 创建页面,内容为“[[File:Shellington .png|缩略图|谢灵通]] 谢灵通(Shellington)是一只海獭,可他却害怕海胆。(因为他对海胆过敏)他不擅长驾驶舰艇(蓝鲸艇除外,他曾经开坏过2-3个舰艇)以及其他交通工具且遇到大事时会手忙脚乱,在第一季第十集《海底小纵队与桨足动物》中,他把魔鬼鱼艇给开坏了;在灯塔水母那集,他又把喷射背包给弄坏了。谢灵通还有轻微的恐…” wikitext text/x-wiki [[File:Shellington .png|缩略图|谢灵通]] 谢灵通(Shellington)是一只海獭,可他却害怕海胆。(因为他对海胆过敏)他不擅长驾驶舰艇(蓝鲸艇除外,他曾经开坏过2-3个舰艇)以及其他交通工具且遇到大事时会手忙脚乱,在第一季第十集《海底小纵队与桨足动物》中,他把魔鬼鱼艇给开坏了;在灯塔水母那集,他又把喷射背包给弄坏了。谢灵通还有轻微的恐高哦。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:男 *物种:海獭 *年龄:约20多岁 *职务:生物学家 *关系:巴克队长(队长)、珍珠(姐姐)、派里克(外甥) == 介绍 == 总是透过他的放大镜观察生物。他博学多识,无所不知,常常能发现队友们所忽略的动人细节。谢灵通很容易被周围的环境分心物所吸引。 谢灵通是一只海獭,可他却害怕海胆(因为他对海胆过敏)。海底交通事故肇事逃逸者,他不擅长驾驶舰艇(蓝鲸艇除外,他曾经开坏过2-3个舰艇)以及其他交通工具且遇到大事时会手忙脚乱,在《桨足动物》那一集中,他把魔鬼鱼艇给开坏了;在《灯塔水母》那集,他又把喷射背包给弄坏了。谢灵通还有轻微的恐高。在英语版里的口头禅是 “Jumping jellyfish!”和“Fascinating!”。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:海獭]] eaf1b3fcd47566d0175df7fbb066e35147b0fd3b Category:海底小纵队成员 14 49 67 2022-09-24T05:13:32Z Richard Robin 2 创建空白页面 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Main Page 0 1 68 1 2022-09-24T05:23:44Z Richard Robin 2 重定向页面至[[首页]] wikitext text/x-wiki #重定向 [[首页]] f6d418391a8893c9c94d42a863386774da0d4ea3 File:DashiDog.png 6 50 69 2022-09-24T05:29:57Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 达西西 0 51 70 2022-09-24T05:31:07Z Richard Robin 2 创建页面,内容为“[[File:DashiDog.png|缩略图|达西西]] 达西西(Dashi)是一条腊肠狗,她喜欢冲浪,也是探险小队的官方摄影师,操控着整个团队的科技装备和通讯装置,是监管章鱼堡操作系统的电脑专家。她拍摄到的影像是小队收集到的数据中必不可少的一部分,并且归入了章鱼堡电脑系统的档案中。除了监控船只交通,在船只运输、追踪天气情况和制作数字表格方面,…” wikitext text/x-wiki [[File:DashiDog.png|缩略图|达西西]] 达西西(Dashi)是一条腊肠狗,她喜欢冲浪,也是探险小队的官方摄影师,操控着整个团队的科技装备和通讯装置,是监管章鱼堡操作系统的电脑专家。她拍摄到的影像是小队收集到的数据中必不可少的一部分,并且归入了章鱼堡电脑系统的档案中。除了监控船只交通,在船只运输、追踪天气情况和制作数字表格方面,她还是巴克队长的左膀右臂。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:女 *物种:腊肠狗 *年龄:约20多岁 *职务:电脑程序员、摄影师 *别称:达西 *关系:巴克队长(队长、信任)、突突兔(同事)、卡西西(妹妹) == 介绍 == 海底小纵队官方摄影师。喜欢冲浪,操控着整个团队的科技装备和通讯装置,是监管章鱼堡操作系统的电脑专家。她拍摄到的影像是小队收集到的数据中必不可少的一部分,并且归入了章鱼堡电脑系统的档案中。除了监控船只交通,在船只运输、追踪天气情况和制作数字表格方面,她还是巴克队长的左膀右臂。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:狗]] b2ec9a7f88608c0177e9e65366ce2612d673b140 File:Profinkling.png 6 52 71 2022-09-24T05:34:33Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 章教授 0 53 72 2022-09-24T05:35:42Z Richard Robin 2 创建页面,内容为“[[File:Profinkling.png|缩略图|章教授]] 章教授(Professor Inkling)是[[海底小纵队(团队)|海底小纵队]]的创始人。 == 资料 == *性别:男 *物种:小飞象章鱼 *年龄:未知 *职务:海洋学家 和 创始人 *别称:教授、小章、老章 关系:海底小纵队成员、喷喷(侄子)、欧文(表哥) == 介绍 == 章教授是一只小飞象章鱼,左眼带着单片眼镜,很爱读书,见多识广。…” wikitext text/x-wiki [[File:Profinkling.png|缩略图|章教授]] 章教授(Professor Inkling)是[[海底小纵队(团队)|海底小纵队]]的创始人。 == 资料 == *性别:男 *物种:小飞象章鱼 *年龄:未知 *职务:海洋学家 和 创始人 *别称:教授、小章、老章 关系:海底小纵队成员、喷喷(侄子)、欧文(表哥) == 介绍 == 章教授是一只小飞象章鱼,左眼带着单片眼镜,很爱读书,见多识广。有喷墨汁的技能。 不常走动,当队员们出去执行任务的时候,会待在基地负责联络工作。他有一个大图书馆,里面有很多很多的书,章教授几乎一整天都呆在图书馆里。章教授还有很多很多的亲戚。另外,章教授也是小队中最年长的一个,是海底小纵队的创始人。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:章鱼]] 1bf9fdafd75fe585400aca73a8db41bc486af44e File:TweakBunny .png 6 54 73 2022-09-24T05:38:17Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 突突兔 0 55 74 2022-09-24T05:39:05Z Richard Robin 2 创建页面,内容为“[[File:TweakBunny .png|缩略图|突突兔]] 突突兔(Tweak)是小队的机械工程师,负责保养小队从灯笼鱼艇到魔鬼鱼艇的所有交通工具。她喜欢为某项特殊的任务改造机械,并且喜欢制作那些以意想不到的方式工作的新奇发明。她喜欢吃胡萝卜,为大家研究了很多发明,也带来了不少麻烦。她总是为她的新发明感到骄傲。“快到你来不及说完拔呀拔呀拔萝卜”…” wikitext text/x-wiki [[File:TweakBunny .png|缩略图|突突兔]] 突突兔(Tweak)是小队的机械工程师,负责保养小队从灯笼鱼艇到魔鬼鱼艇的所有交通工具。她喜欢为某项特殊的任务改造机械,并且喜欢制作那些以意想不到的方式工作的新奇发明。她喜欢吃胡萝卜,为大家研究了很多发明,也带来了不少麻烦。她总是为她的新发明感到骄傲。“快到你来不及说完拔呀拔呀拔萝卜”是她的口头禅。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:女 *物种:兔子 *年龄:约20多岁 *职务:工程师 *别称:大姐姐 *关系:巴克队长(队长)、呱唧(同事)、达西西(同事)、沼泽游侠(父亲) == 介绍 == 突突兔是小队的机械工程师,负责保养小队从灯笼鱼艇到魔鬼鱼艇的所有交通工具。她喜欢为某项特殊的任务改造机械,并且喜欢制作那些以意想不到的方式工作的新奇发明。她喜欢吃胡萝卜,为大家研究了很多发明,也带来了不少麻烦。她总是为她的新发明感到骄傲。“快到你来不及说完拔呀拔呀拔萝卜”(英文版是:“faster than you can say ‘buncha munchy crunchy carrots’!”)是她的口头禅。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:兔]] 353bc6feb33617d278f125d90eb8291fa2fe4264 海底小纵队维基:动画工程 4 56 79 2022-09-24T15:42:09Z Richard Robin 2 创建页面,内容为“== 该工程收录范围 == 动画工程涵盖《海底小纵队》动画中的主系列剧集以及特别篇、电影等其他视频节目。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写从动画每一季的介绍,包括了登场人物、整季所有集数出现的生物以及信息框。 *编写动画中所有的集,包括了摘要、登场人物、该集介绍(出现)的生物以及信息框。 *编写每…” wikitext text/x-wiki == 该工程收录范围 == 动画工程涵盖《海底小纵队》动画中的主系列剧集以及特别篇、电影等其他视频节目。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写从动画每一季的介绍,包括了登场人物、整季所有集数出现的生物以及信息框。 *编写动画中所有的集,包括了摘要、登场人物、该集介绍(出现)的生物以及信息框。 *编写每部在电影院或网络上映的大电影,包括了摘要、登场人物、该部电影出现的生物以及信息框。 *编写动画特别篇等其他视频页面。 == 该工程可能会经常使用到的模板 == (目前百科正在筹备中,相关模板待完善) [[分类:海底小纵队维基工程]] f695d0cf6d01dceb70320f567071c539e7b3201e 海底小纵队维基:图书工程 4 57 80 2022-09-24T15:46:11Z Richard Robin 2 创建页面,内容为“== 该工程收录范围 == 图书工程主要涵盖由Meomi工作室制作的《海底小纵队》原著绘本、《海底小纵队》动画片改编的周边图书等纸质传媒产品。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写《海底小纵队》原著绘本的页面。 *编写《海底小纵队》动画改编图书(包括绘本、漫画等)的页面。 == 该工程可能会经常使用到的模板 ==…” wikitext text/x-wiki == 该工程收录范围 == 图书工程主要涵盖由Meomi工作室制作的《海底小纵队》原著绘本、《海底小纵队》动画片改编的周边图书等纸质传媒产品。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写《海底小纵队》原著绘本的页面。 *编写《海底小纵队》动画改编图书(包括绘本、漫画等)的页面。 == 该工程可能会经常使用到的模板 == (目前百科正在筹备中,相关模板待完善) [[分类:海底小纵队维基工程]] a314df9317e09ff6bc008c96a638606f2a166bb0 海底小纵队维基:生物工程 4 58 81 2022-09-24T15:53:59Z Richard Robin 2 创建页面,内容为“== 该工程收录范围 == 生物工程主要收录所有在《海底小纵队》动画片中介绍(登场)的现实生物。主要出场角色(如“[[巴克队长]]”、“[[呱唧]]”等)的物种也在工程的编写范围内。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写所有在《海底小纵队》动画片中出现(介绍)的现实中存在的生物。 == 编写要求 == *所有生物工程…” wikitext text/x-wiki == 该工程收录范围 == 生物工程主要收录所有在《海底小纵队》动画片中介绍(登场)的现实生物。主要出场角色(如“[[巴克队长]]”、“[[呱唧]]”等)的物种也在工程的编写范围内。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写所有在《海底小纵队》动画片中出现(介绍)的现实中存在的生物。 == 编写要求 == *所有生物工程中收录的生物在信息栏都'''必须配上'''该生物在动画中的形象以及在现实中的照片。 *除特殊情况外,所有现实中的照片都需要在上传时选用“原作者保留权利(原作者没有明确的授权声明)”许可协议。 *引用其他文献时,请遵守引用文章的版权协议。 == 该工程可能会经常使用到的模板 == (目前百科正在筹备中,相关模板待完善) [[分类:海底小纵队维基工程]] 0315e8be09e03d3239091d6aade11e684cac2aac Category:海底小纵队维基工程 14 59 82 2022-09-24T16:07:05Z Richard Robin 2 创建空白页面 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 海底小纵队维基:角色工程 4 60 83 2022-09-24T16:13:13Z Richard Robin 2 创建页面,内容为“== 该工程收录范围 == 角色工程主要收录的是《海底小纵队》动画、原著绘本中登场的角色。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写[[海底小纵队(团队)|海底小纵队]]中的所有主要成员与外派员等角色。包括他们的摘要、信息栏、详细介绍、画廊等内容。 *编写《海底小纵队》原著绘本中出现的角色。 *编写《海底小纵队…” wikitext text/x-wiki == 该工程收录范围 == 角色工程主要收录的是《海底小纵队》动画、原著绘本中登场的角色。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写[[海底小纵队(团队)|海底小纵队]]中的所有主要成员与外派员等角色。包括他们的摘要、信息栏、详细介绍、画廊等内容。 *编写《海底小纵队》原著绘本中出现的角色。 *编写《海底小纵队》动画中出场(被介绍)的生物角色。 == 注意 == 请在编写该工程时注意不要和'''生物工程'''的工作混淆。 == 该工程可能会经常使用到的模板 == (目前百科正在筹备中,相关模板待完善) [[分类:海底小纵队维基工程]] dc72235e6eca2a5bede74891a8152daedfdf49df Template:Mbox templates see also 10 973 1947 2022-09-27T19:16:15Z wikipedia>Izno 0 remove per discussion on [[Template talk:Talk header]] wikitext text/x-wiki <div>{{view|Template:Mbox templates see also|edit|brackets=yes}} There are seven metatemplates in the [[Module:Message box]] family:</div> * {{tl|Ambox}}, for messageboxes on article pages. * {{tl|Cmbox}}, for messageboxes on category pages. * {{tl|Imbox}}, for messageboxes on file (image) pages. * {{tl|Tmbox}}, for messageboxes on talk pages. * {{tl|Fmbox}}, for header and footer messageboxes. * {{tl|Ombox}}, for messageboxes on other types of page. * {{tl|Mbox}}, for messageboxes that are used in different [[Wikipedia:Namespace|namespaces]] and change their presentation accordingly. Closely related metatemplates: * {{tl|Asbox}}, for messageboxes in article stubs. * {{tl|Dmbox}}, for messageboxes on disambiguation or set-index pages. * {{tla|Ivory messagebox|Ivmbox}}, a simple full-width box with default ivory background intended to frame important messages or notices.<noinclude> {{Documentation}} </noinclude> bb802665b65c4908f4fea71ac8ca65ef82ff71c8 Template:Simpleboxtop 10 61 85 2022-09-29T08:00:44Z Richard Robin 2 创建页面,内容为“{| style="background-color:{{{bgcolor|#e6e6e6}}};float:{{{align|right}}};width:{{{width|200px}}};padding:{{{padding|4px}}};border-radius:{{{round|4px}}};{{{infoboxcss|}}};" |+ <big>{{{title|Title}}}</big> |- ! colspan=2 style="text-align:center" | <big>'''{{{toptext|Toptext}}}'''</big> |- | colspan=2 | [[File:{{{image|AxeOrChainsaw.png}}} | {{{imgwidth|140}}}px | {{{imgalign|center}}}]] |- | colspan=2 style="text-align:center" | {{{subtitle|Image subtitle}}} <n…” wikitext text/x-wiki {| style="background-color:{{{bgcolor|#e6e6e6}}};float:{{{align|right}}};width:{{{width|200px}}};padding:{{{padding|4px}}};border-radius:{{{round|4px}}};{{{infoboxcss|}}};" |+ <big>{{{title|Title}}}</big> |- ! colspan=2 style="text-align:center" | <big>'''{{{toptext|Toptext}}}'''</big> |- | colspan=2 | [[File:{{{image|AxeOrChainsaw.png}}} | {{{imgwidth|140}}}px | {{{imgalign|center}}}]] |- | colspan=2 style="text-align:center" | {{{subtitle|Image subtitle}}} <noinclude>|}{{Documentation}}[[Category:Simplebox]]</noinclude> 4a1faa3f59f44c9487b86879e147f6bc1f065e63 Template:Simpleboxdata 10 62 86 2022-09-29T08:01:47Z Richard Robin 2 创建页面,内容为“|- style="{{{css|}}}" | '''{{{label|Label}}}''' || {{{data|Data}}} <noinclude>{{Documentation|content=[[Template:Simpleboxtop#Data cells|'''See documentation''']]}}[[Category:Simplebox]]</noinclude>” wikitext text/x-wiki |- style="{{{css|}}}" | '''{{{label|Label}}}''' || {{{data|Data}}} <noinclude>{{Documentation|content=[[Template:Simpleboxtop#Data cells|'''See documentation''']]}}[[Category:Simplebox]]</noinclude> 2adcd773d37b37bcbbd58b92e3b60f44e1da729c Template:Simpleboxtop/doc 10 63 87 2022-09-29T08:02:02Z Richard Robin 2 创建页面,内容为“Infoboxes are really complicated. A much more simple one could be made using normal wikitext formatting. This template is a simple infobox. {| class="wikitable" |+ Parameters/variables |- ! Parameter !! Usage !! Default value |- | title || The text on top of the infobox || Title |- | toptext || The text above the image || Toptext |- | image || The link to image used, below the toptext || AxeOrChainsaw.png |- | imgwidth || Width of the image in pixels || 140 |-…” wikitext text/x-wiki Infoboxes are really complicated. A much more simple one could be made using normal wikitext formatting. This template is a simple infobox. {| class="wikitable" |+ Parameters/variables |- ! Parameter !! Usage !! Default value |- | title || The text on top of the infobox || Title |- | toptext || The text above the image || Toptext |- | image || The link to image used, below the toptext || AxeOrChainsaw.png |- | imgwidth || Width of the image in pixels || 140 |- | imgalign || Align of the image || center |- | subtitle || Image subtitle, appears below the image || Image subtitle |- | colspan=3 style="text-align:center" | Other optional parameters |- | bgcolor || Background color of the infobox || #e6e6e6 |- | align || Alignment of the infobox || right |- | width || Width of the infobox, can be overwritten if the image is bigger than the specified width || 200px |- | padding || Space in the infobox || 4px |- | round || Border radius || 4px |- | infoboxcss || Additional css for the infobox || <span style="font-size:80%;color:gray">(None)</span> |} == Data cells == Data can be inserted into a simplebox using [[Template:Simpleboxdata]]. That template has these parameters: {| class="wikitable" |+ Parameters/variables |- ! Parameter !! Usage !! Default value |- | label || Label of the data cell || Label |- | data || Text to the right of the label || Data |- | css || Additional css for the data cell || <span style="font-size:80%;color:gray">(None)</span> |} == Example usage == {{Simpleboxtop | title = Fruit | toptext = Apple | image = Alice_(apple).jpg | subtitle = An alice apple }} {{Simpleboxdata|label=Type of plant|data=Fruit}} {{Simpleboxdata|label=Popularity|data=Very popular}} {{Simpleboxdata|label=Edible|data=Yes}} |} <pre>{{Simpleboxtop | title = Fruit | toptext = Apple | image = Alice_(apple).jpg | subtitle = An alice apple }} {{Simpleboxdata|label=Type of plant|data=Fruit}} {{Simpleboxdata|label=Popularity|data=Very popular}} {{Simpleboxdata|label=Edible|data=Yes}} |}</pre> The <nowiki>|}</nowiki> at the end of each simplebox is required as simpleboxes are tables. 4eca1310b1f204d6bd4b9d5b66133d224d2663dc File:The Octonauts and the Whale Shark.png 6 64 91 2022-09-29T09:05:44Z Richard Robin 2 The Octonauts and the Whale Shark wikitext text/x-wiki == 摘要 == The Octonauts and the Whale Shark == 许可协议 == {{Copyright}} 0fe2095c577da99471a5846f662e49fe885efa0d 海底小纵队与鲸鲨 0 65 92 2022-09-29T09:40:45Z Richard Robin 2 创建页面,内容为“{{Simpleboxtop | title = | toptext = <big>海底小纵队与鲸鲨</big><br>The Octonauts and the Whale Shark | image = The Octonauts and the Whale Shark.png | width = 300px | imgwidth = 300px | bgcolor = #96FED1 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月4日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=英文版没有上…” wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与鲸鲨</big><br>The Octonauts and the Whale Shark | image = The Octonauts and the Whale Shark.png | width = 300px | imgwidth = 300px | bgcolor = #96FED1 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月4日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=英文版没有上一集<br> [[海底小纵队与装饰蟹|装饰蟹]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与海底风暴|海底风暴]](英文版)<br> [[海底小纵队与大王乌贼|大王乌贼]](中文版)}} |} '''海底小纵队与鲸鲨'''("The Octonauts and the Whale Shark")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中属于名副其实的“第1季第1集” <ref>{{cite web | title = The Whale Shark Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Whale_Shark | date = 2022-09-29 | archiveurl = http://archive.today/8o6Zk | archivedate = 2022-09-29 }}</ref>,中文版则被安排在了第1季第14集中。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] *[[章教授]] *[[小萝卜]]和[[植物鱼]]们 *[[鲸鲨(角色)| 鲸鲨]] *Firefly Squid ==舰艇== *[[灯笼鱼艇]] ==Plot== ==='''The "Cave"'''=== [[Captain Barnacles]], [[Shellington]], and [[Peso]] are looking at pictures being sent to the [[Octopod]] by [[Dashi]], who is exploring an underwater cave. Peso notices the cave floor is red and wiggly. Barnacles comments on how some rocks hanging from the cave roof look "kind of familiar". Shellington then notices that they are not rocks, but teeth and that the floor is a tongue! Barnacles and Shellington then realize the truth - Dashi's not inside a cave, but a whale shark! The Captain contacts Dashi and tells her to leave the "cave" immediately, and she swims towards the mouth, but drops her camera and has to swim back for it. The whale shark closes its mouth and she, therefore, does not make it out in time. Shellington can't radio her as the signal has been lost now that the mouth is shut. Captain Barnacles tells Peso to sound the [[Octo-Alert]]! He commands all the Octonauts to report to the [[Launch bay|launch bay]]. ==='''The Mission'''=== Captain Barnacles informs the other Octonauts ([[Kwazii]], [[Tweak]], [[Tunip]], and [[Professor Inkling]]) that Dashi has been swallowed by a whale shark. Tunip asks Shellington if a whale shark is a whale. Shellington tells him that a whale shark is not a whale, but a shark (which is a fish) and the biggest fish in the ocean. Professor Inkling mentions how the fish is a ''filter feeder'', which means it just opens its mouth and swallows whatever's there (meaning it didn't swallow Dashi on purpose). Barnacles instructs Kwazii and Peso to enter the [[GUP-A]] to go and save her. Tweak gives the captain a whale shark detector so they'll know where the whale shark is. She opens the [[Octo-Hatch]] and they go. Peso keeps a lookout in the GUP-A while Barnacles and Kwazii plan tactics outside. Unfortunately, despite Peso's attempts to warn them, they do not notice the whale shark approaching and are also swallowed up... ==='''Inside the Whale Shark'''=== Barnacles and Kwazii are now inside the whale shark with Dashi. However, she doesn't seem to be anywhere around, so a little exploring is in order. Kwazii notices a hair clip belonging to Dashi, on the floor on their side of the shark's sponge wall, which means Dashi is on the other side. They squeeze through and fall down a dark tunnel! They hear a strange clicking sound and wonder what it is. Then out of nowhere, Dashi appears clicking her camera! She tells them they're inside the whale shark's stomach! The Captain says they need to get out now before they sink through. So they climb back up the tunnel and through the sponge wall, all the way back to the mouth. ==='''Peso and the Whale Shark'''=== Outside, Peso is trying to contact Captain Barnacles and Kwazii, with no success, when the whale shark moans in pain. Peso, being a medic, goes to investigate. He checks the whale shark's ear and nose but then sees the pain is in the whale shark's stomach. However, the whale shark seems unwilling to open its mouth. Peso reads his medical book and finds out if you tickle a whale shark's gills, he opens his mouth! So that's exactly what he does. ==='''Barnacles, Kwazii and Dashi Escape'''=== With the combined effort of the three Octonauts inside trying to push open the mouth, and Peso tickling the gills, Captain Barnacles, Kwazii and Dashi escape from the whale shark! Its stomachache is now cured, and the Octonauts are free, but Kwazii later makes the mistake of calling it little, causing it to burp at him (and inadvertently the others) in retaliation. ==='''Back Home'''=== Shellington and Dashi are deciding which of the pictures Dashi took to send to National Seographic (a parody of National Geographic). Professor Inkling says they should send them all, when a picture appears on the screen of Barnacles holding a startled looking Kwazii when they first saw Dashi in the whale shark's stomach. They quickly say not all of the pictures are nice, and she should probably skip some. Tunip and another Vegimal ([[Codish|Codish)]] then imitate the picture on the screen, jumping into each others arms. This makes everyone laugh, and the episode ends. ==Trivia/Goofs== * The characters paired up for this mission are [[Captain Barnacles]], [[Kwazii Cat|Kwazii]], [[Peso Penguin|Peso]], and [[Dashi]]. * This episode’s Creature Report is on [[Whale Shark (Character)| Whale Sharks]]. *An episode in season 2, [[The Porcupine Puffer]], is a bit like a sequel to this episode. *This episode was aired as the fourteenth episode in the US version. *This is the pilot episode of Octonauts in the UK version. *In the US version, this episode begins after "The Decorator Crab". [[Category:剧集]] [[Category:第一季]] 88bf45287d4f22adfc390e87cfe55395e6237d63 93 92 2022-09-29T10:29:24Z Richard Robin 2 修改错误内容 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与鲸鲨</big><br>The Octonauts and the Whale Shark | image = The Octonauts and the Whale Shark.png | width = 300px | imgwidth = 300px | bgcolor = #96FED1 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月4日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=英文版没有上一集<br> [[海底小纵队与装饰蟹|装饰蟹]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与海底风暴|海底风暴]](英文版)<br> [[海底小纵队与雪茄鲛|雪茄鲛]](中文版)}} |} '''海底小纵队与鲸鲨'''("The Octonauts and the Whale Shark")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中属于名副其实的“第1季第1集” <ref>{{cite web | title = The Whale Shark Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Whale_Shark | date = 2022-09-29 | archiveurl = http://archive.today/8o6Zk | archivedate = 2022-09-29 }}</ref>,中文版则被安排在了第1季第14集中。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] *[[章教授]] *[[小萝卜]]和[[植物鱼]]们 *[[鲸鲨(角色)| 鲸鲨]] *Firefly Squid ==舰艇== *[[灯笼鱼艇]] ==Plot== ==='''The "Cave"'''=== [[Captain Barnacles]], [[Shellington]], and [[Peso]] are looking at pictures being sent to the [[Octopod]] by [[Dashi]], who is exploring an underwater cave. Peso notices the cave floor is red and wiggly. Barnacles comments on how some rocks hanging from the cave roof look "kind of familiar". Shellington then notices that they are not rocks, but teeth and that the floor is a tongue! Barnacles and Shellington then realize the truth - Dashi's not inside a cave, but a whale shark! The Captain contacts Dashi and tells her to leave the "cave" immediately, and she swims towards the mouth, but drops her camera and has to swim back for it. The whale shark closes its mouth and she, therefore, does not make it out in time. Shellington can't radio her as the signal has been lost now that the mouth is shut. Captain Barnacles tells Peso to sound the [[Octo-Alert]]! He commands all the Octonauts to report to the [[Launch bay|launch bay]]. ==='''The Mission'''=== Captain Barnacles informs the other Octonauts ([[Kwazii]], [[Tweak]], [[Tunip]], and [[Professor Inkling]]) that Dashi has been swallowed by a whale shark. Tunip asks Shellington if a whale shark is a whale. Shellington tells him that a whale shark is not a whale, but a shark (which is a fish) and the biggest fish in the ocean. Professor Inkling mentions how the fish is a ''filter feeder'', which means it just opens its mouth and swallows whatever's there (meaning it didn't swallow Dashi on purpose). Barnacles instructs Kwazii and Peso to enter the [[GUP-A]] to go and save her. Tweak gives the captain a whale shark detector so they'll know where the whale shark is. She opens the [[Octo-Hatch]] and they go. Peso keeps a lookout in the GUP-A while Barnacles and Kwazii plan tactics outside. Unfortunately, despite Peso's attempts to warn them, they do not notice the whale shark approaching and are also swallowed up... ==='''Inside the Whale Shark'''=== Barnacles and Kwazii are now inside the whale shark with Dashi. However, she doesn't seem to be anywhere around, so a little exploring is in order. Kwazii notices a hair clip belonging to Dashi, on the floor on their side of the shark's sponge wall, which means Dashi is on the other side. They squeeze through and fall down a dark tunnel! They hear a strange clicking sound and wonder what it is. Then out of nowhere, Dashi appears clicking her camera! She tells them they're inside the whale shark's stomach! The Captain says they need to get out now before they sink through. So they climb back up the tunnel and through the sponge wall, all the way back to the mouth. ==='''Peso and the Whale Shark'''=== Outside, Peso is trying to contact Captain Barnacles and Kwazii, with no success, when the whale shark moans in pain. Peso, being a medic, goes to investigate. He checks the whale shark's ear and nose but then sees the pain is in the whale shark's stomach. However, the whale shark seems unwilling to open its mouth. Peso reads his medical book and finds out if you tickle a whale shark's gills, he opens his mouth! So that's exactly what he does. ==='''Barnacles, Kwazii and Dashi Escape'''=== With the combined effort of the three Octonauts inside trying to push open the mouth, and Peso tickling the gills, Captain Barnacles, Kwazii and Dashi escape from the whale shark! Its stomachache is now cured, and the Octonauts are free, but Kwazii later makes the mistake of calling it little, causing it to burp at him (and inadvertently the others) in retaliation. ==='''Back Home'''=== Shellington and Dashi are deciding which of the pictures Dashi took to send to National Seographic (a parody of National Geographic). Professor Inkling says they should send them all, when a picture appears on the screen of Barnacles holding a startled looking Kwazii when they first saw Dashi in the whale shark's stomach. They quickly say not all of the pictures are nice, and she should probably skip some. Tunip and another Vegimal ([[Codish|Codish)]] then imitate the picture on the screen, jumping into each others arms. This makes everyone laugh, and the episode ends. ==Trivia/Goofs== * The characters paired up for this mission are [[Captain Barnacles]], [[Kwazii Cat|Kwazii]], [[Peso Penguin|Peso]], and [[Dashi]]. * This episode’s Creature Report is on [[Whale Shark (Character)| Whale Sharks]]. *An episode in season 2, [[The Porcupine Puffer]], is a bit like a sequel to this episode. *This episode was aired as the fourteenth episode in the US version. *This is the pilot episode of Octonauts in the UK version. *In the US version, this episode begins after "The Decorator Crab". [[Category:剧集]] [[Category:第一季]] 553688f1558b0b5c843684918bd5aa48faaa1f26 File:The Octonauts and the Underwater Storm.png 6 66 94 2022-09-29T10:35:33Z Richard Robin 2 The Octonauts and the Underwater Storm wikitext text/x-wiki == 摘要 == The Octonauts and the Underwater Storm == 许可协议 == {{Copyright}} 6c907eab93f2ab96119aa62e71c7fb8269abb345 海底小纵队与海底风暴 0 67 95 2022-09-29T10:43:50Z Richard Robin 2 创建页面,内容为“{{Simpleboxtop | title = | toptext = <big>海底小纵队与海底风暴</big><br><small>The Octonauts and the Underwater Storm</small> | image = The Octonauts and the Underwater Storm.png | width = 300px | imgwidth = 300px | bgcolor = #ACD6FF | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月5日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上…” wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与海底风暴</big><br><small>The Octonauts and the Underwater Storm</small> | image = The Octonauts and the Underwater Storm.png | width = 300px | imgwidth = 300px | bgcolor = #ACD6FF | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月5日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>中文版没有上一集}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与螃蟹海胆|螃蟹海胆]](英文版)<br> [[海底小纵队与大王乌贼|大王乌贼]](中文版)}} |} '''海底小纵队与海底风暴'''("The Octonauts and the Underwater Storm")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在中文版作为第1季第1集播出<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref>,英国英文版则为第1季第2集,美国英文版也将其作为试播集播出。<ref> {{cite web | title = The Undersea Storm Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Undersea_Storm | date = 2022-09-29 | archiveurl = http://archive.today/QBZju | archivedate = 2022-09-29 }} </ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *The [[Reef Lobsters]] *[[Sea Urchin]] and zebra fish and green turtle and octopus and snot sea cucumber and crabs and green eel and hermit crabs (不完整,待补充) ==舰艇== *[[虎鲨艇]] *[[蓝鲸艇]] ==Summary== ==='''A New Upgrade'''=== The episode begins with [[Tweak]] working on the [[Gup-B]], adding a turbo button that [[Kwazii]] approves. He later goes out for a test drive, but ignores [[Tweak]]'s reminders of the conditions to use the turbo button, much to her chagrin. He enjoys himself. Meanwhile, [[Dashi]] suddenly alerts [[Captain Barnacles]] of a large storm using the [[Storm Tracker]]. A look from the [[Octoscope]] confirms this, and soon, all hands are on deck at making the [[Octopod]] safe for the storm, but when Barnacles got to Kwazii, a nervous Tweak then tells him about the test drive. ==='''Test Drive'''=== As expected, Kwazii was having the time of his life, entertaining a young [https://en.wikipedia.org/wiki/Reef_lobster reef lobster] who soon blows away. Kwazii notices this, and immediately heads out to rescue it. Unfortunately, it caused him to miss a call from Dashi. As he returns the little lobster, only then does he know about the storm. After a painful handshake, he sets off to save the creatures in the storm, receiving a second call from the [[Octopod]]. Letting them know of his current task, he sets out after getting permission from Barnacles. ==='''The Crash'''=== Multiple animals were rescued, and Kwazii sets off to the Octopod, seeing the little reef lobster along the way. Unfortunately, the Gup-B struggles against the storm, prompting him to use the turbo button - only to crash into some rocks. After losing contact, Barnacles heads out on a rescue mission in the [[Gup-C]], planning on towing the Gup-B home. However, the rescue attempt almost fails as the cable snaps, but luckily, the little reef lobster and his family form a chain and linked the cable. ==='''Return to the Octopod'''=== After pulling the Gup-B free, Barnacles heads back as fast as he can, with the little lobster and his family keeping the Gup-B secure behind. They make it just in time. All the Octonauts are safe and sound inside, with Kwazii and Barnacles giving their thanks to the little lobster. He accepts, and decides to stay in the Octopod for the time being. Tweak provides some commentary on the test drive, and soon, everyone was enjoying hot cocoa. ==Trivia/Goofs== * The characters paired up for this mission are [[Captain Barnacles]] and [[Kwazii Cat|Kwazii]]. * This episode’s Creature Report is on [[Reef Lobsters]] * This is the pilot episode of Octonauts in the US version. * The little lobster's family keeps changing size throughout the episode. * When Dashi says The storm is 10 minutes she is rather smiling then worried. * The 2 zebrafish Kwazii rescues lose their white pupils when the get to the reef. *This is the first episode where an octonaut crashes a gup, in this case its Kwazii. [[Category:剧集]] [[Category:第一季]] 56c6c68502c5a0e6e572deb002cfffa0b0159ea4 97 95 2022-09-29T10:52:50Z Richard Robin 2 英文谬误修正 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与海底风暴</big><br><small>The Octonauts and the Undersea Storm</small> | image = The Octonauts and the Underwater Storm.png | width = 300px | imgwidth = 300px | bgcolor = #ACD6FF | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月5日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>中文版没有上一集}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与螃蟹海胆|螃蟹海胆]](英文版)<br> [[海底小纵队与大王乌贼|大王乌贼]](中文版)}} |} '''海底小纵队与海底风暴'''("The Octonauts and the Undersea Storm")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在中文版作为第1季第1集播出<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref>,英国英文版则为第1季第2集,美国英文版也将其作为试播集播出。<ref> {{cite web | title = The Undersea Storm Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Undersea_Storm | date = 2022-09-29 | archiveurl = http://archive.today/QBZju | archivedate = 2022-09-29 }} </ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *The [[Reef Lobsters]] *[[Sea Urchin]] and zebra fish and green turtle and octopus and snot sea cucumber and crabs and green eel and hermit crabs (不完整,待补充) ==舰艇== *[[虎鲨艇]] *[[蓝鲸艇]] ==Summary== ==='''A New Upgrade'''=== The episode begins with [[Tweak]] working on the [[Gup-B]], adding a turbo button that [[Kwazii]] approves. He later goes out for a test drive, but ignores [[Tweak]]'s reminders of the conditions to use the turbo button, much to her chagrin. He enjoys himself. Meanwhile, [[Dashi]] suddenly alerts [[Captain Barnacles]] of a large storm using the [[Storm Tracker]]. A look from the [[Octoscope]] confirms this, and soon, all hands are on deck at making the [[Octopod]] safe for the storm, but when Barnacles got to Kwazii, a nervous Tweak then tells him about the test drive. ==='''Test Drive'''=== As expected, Kwazii was having the time of his life, entertaining a young [https://en.wikipedia.org/wiki/Reef_lobster reef lobster] who soon blows away. Kwazii notices this, and immediately heads out to rescue it. Unfortunately, it caused him to miss a call from Dashi. As he returns the little lobster, only then does he know about the storm. After a painful handshake, he sets off to save the creatures in the storm, receiving a second call from the [[Octopod]]. Letting them know of his current task, he sets out after getting permission from Barnacles. ==='''The Crash'''=== Multiple animals were rescued, and Kwazii sets off to the Octopod, seeing the little reef lobster along the way. Unfortunately, the Gup-B struggles against the storm, prompting him to use the turbo button - only to crash into some rocks. After losing contact, Barnacles heads out on a rescue mission in the [[Gup-C]], planning on towing the Gup-B home. However, the rescue attempt almost fails as the cable snaps, but luckily, the little reef lobster and his family form a chain and linked the cable. ==='''Return to the Octopod'''=== After pulling the Gup-B free, Barnacles heads back as fast as he can, with the little lobster and his family keeping the Gup-B secure behind. They make it just in time. All the Octonauts are safe and sound inside, with Kwazii and Barnacles giving their thanks to the little lobster. He accepts, and decides to stay in the Octopod for the time being. Tweak provides some commentary on the test drive, and soon, everyone was enjoying hot cocoa. ==Trivia/Goofs== * The characters paired up for this mission are [[Captain Barnacles]] and [[Kwazii Cat|Kwazii]]. * This episode’s Creature Report is on [[Reef Lobsters]] * This is the pilot episode of Octonauts in the US version. * The little lobster's family keeps changing size throughout the episode. * When Dashi says The storm is 10 minutes she is rather smiling then worried. * The 2 zebrafish Kwazii rescues lose their white pupils when the get to the reef. *This is the first episode where an octonaut crashes a gup, in this case its Kwazii. [[Category:剧集]] [[Category:第一季]] f3f7a19c0b3e4f14605a35faff836c12bd9f4c6d Category:剧集 14 68 100 2022-09-29T16:23:29Z Richard Robin 2 创建空白页面 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Template:Tl 10 32 1645 46 2022-09-30T01:09:19Z Pppery 34 Redirected page to [[Template:Template link]] wikitext text/x-wiki #REDIRECT [[Template:Template link]] fb9a6b420e13178e581af6e7d64274cd30a79017 Template:Template link 10 841 1641 2022-09-30T01:10:00Z Pppery 34 46 revisions imported from [[:wikipedia:Template:Template_link]] wikitext text/x-wiki &#123;&#123;[[Template:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> eabbec62efe3044a98ebb3ce9e7d4d43c222351d Template:Documentation 10 18 1629 30 2022-09-30T01:43:37Z MacFan4000 36 4 revisions imported from [[:meta:Template:Documentation]]: this is useful and was on templateiwki wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>[[Category:Templates]]</noinclude> 9885bb4fa99bf3d5b960e73606bbb8eed3026877 Template:Tlx 10 843 1647 2022-09-30T02:04:32Z Pppery 34 Redirected page to [[Template:Template link expanded]] wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] 155e901040104f96908f1f4627c4eb3501301bf9 Module:Arguments 828 837 1633 2022-09-30T02:32:01Z Pppery 34 24 revisions imported from [[:wikipedia:Module:Arguments]] Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Documentation 828 838 1635 2022-09-30T02:36:08Z Pppery 34 Pppery moved page [[Module:Documentation/2]] to [[Module:Documentation]] without leaving a redirect Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink, purgeLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 78cc3a78f2b5dbb267fa16027c0800a22dbd3c42 File:Crab and urchin title card.jpg 6 69 102 2022-09-30T13:06:35Z Richard Robin 2 Crab_and_urchin wikitext text/x-wiki == 摘要 == Crab_and_urchin == 许可协议 == {{Copyright}} 9300f75ddce4b36f25c9e86352f8faba616b7ca9 海底小纵队与螃蟹海胆 0 70 103 2022-09-30T13:17:54Z Richard Robin 2 创建页面,内容为“{{Simpleboxtop | title = | toptext = <big>海底小纵队与螃蟹海胆</big><br>The Octonauts and the Crab and Urchin | image = Crab and urchin title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #849cc8 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月6日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=海底小纵…” wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与螃蟹海胆</big><br>The Octonauts and the Crab and Urchin | image = Crab and urchin title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #849cc8 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月6日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与海底风暴|海底风暴]](英文版)<br> [[海底小纵队与怪兽地图|怪兽地图]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与海象首领|海象首领]](英文版)<br> [[海底小纵队与白化座头鲸|白化座头鲸]](中文版)}} |} '''海底小纵队与螃蟹海胆'''("The Octonauts and the Crab and Urchin")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中为第1季第3集<ref>{{cite web | title = The Crab and Urchin Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Crab_and_Urchin | date = 2022-09-30 | archiveurl = http://archive.today/ptdI7 | archivedate = 2022-09-30 }}</ref>,中文版为第1季第8集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] (不完全,待补全) == Synopsis == === '''Someone's at the Door''' === The episode starts with [[Kwazii Cat|Kwazii]] and [[Captain Barnacles]] waking up to a loud banging noise. The two decide to have a race to the door of the [[Octopod]]. Kwazii arrives at the door first, but is stuck at the point of opening it, so Barnacles helps instead. However, when they first opened the door, no one was there but when they closed the door the banging continued. So they opened the door eventually finding that a [[Sea Snails|sea snail]] was at the door. The snail expresses his troubles to the two telling them some kind of half crab half sea urchin is keeping all the sea snails awake. Both Kwazii and Barnacles want to sort out the problem so they have a race to the [[List of Gups|Gups]] and then to the reef. === '''Arguing Halfs''' === Barnacles wins the race by going down the quickest route. The snail then shows both of them the creature who's making the noise which to no surprise is arguing with itself, but Barnacles and Kwazii don't know what the creature is and so decide to contact a sleepy [[Shellington Sea Otter|Shellington]]. Shellington tells them that the creature is two creatures a crab with a [[Sea Urchin|sea urchin]] stuck to its back as a process of symbiosis as both creatures rely on each other for food and protection. Barnacles tries to get their attention but they start arguing about who the problem is. Kwazii suggests splitting the two apart just for a bit the urchin and crab agree. Kwazii takes the urchin to the other side of the reef while the crab stays on a rock telling Barnacles that he's fine on his own, but the crab gets scared away by a lobster so Barnacles decides to teach the crab how to protect himself. === '''Separation''' === Meanwhile Kwazii tries to find a spot for the urchin to stay but almost all areas according to the urchin do not have enough food for him. The urchin once finding a good spot asks Kwazii if he has any snacks which he does not so the urchin then asks Kwazii what the plan is, but Kwazii doesn't have a plan. But he knows someone who does and goes to find Barnacles. Barnacles tries to teach the crab that it's about attitude and confidence but the crab can't make himself look scary. So they decide to look for Kwazii. === '''Back Together''' === Barnacles and Kwazii then bump into each other while looking for each other resulting in the urchin and crab reuniting back together. Both the crab and urchin realize how important each other are. And so the episode end with Captain Barnacles and Kwazii racing each other back to the Octopod in the [[Gup-D]] and [[Gup-B]]. ==Creature Report == *A [[Blue Crab|crab]] and a [[Sea Urchin|sea urchin]] ==Trivia/Goofs== *[[Inkling|Professor Inkling]] and the [[Vegimals]] are not in this episode.  *When [[Dashi]] is shown inside the Octo-Alert, her headphones are missing.  *Parallel: Barnacles and Kwazii were having the same problem the crab and urchin were having. Competing or racing with each other to see who gets a task done faster. They all soon realize that working together is always vital. *The crab in this episode is supposed to be a carrier crab, but he instead looks like a blue crab. [[Category:剧集]] [[Category:第一季]] 4436624a923d9a12563a72bb944721c0a6e616bc 104 103 2022-09-30T13:19:02Z Richard Robin 2 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与螃蟹海胆</big><br><small>The Octonauts and the Crab and Urchin</small> | image = Crab and urchin title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #849cc8 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月6日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与海底风暴|海底风暴]](英文版)<br> [[海底小纵队与怪兽地图|怪兽地图]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与海象首领|海象首领]](英文版)<br> [[海底小纵队与白化座头鲸|白化座头鲸]](中文版)}} |} '''海底小纵队与螃蟹海胆'''("The Octonauts and the Crab and Urchin")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中为第1季第3集<ref>{{cite web | title = The Crab and Urchin Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Crab_and_Urchin | date = 2022-09-30 | archiveurl = http://archive.today/ptdI7 | archivedate = 2022-09-30 }}</ref>,中文版为第1季第8集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] (不完全,待补全) == Synopsis == === '''Someone's at the Door''' === The episode starts with [[Kwazii Cat|Kwazii]] and [[Captain Barnacles]] waking up to a loud banging noise. The two decide to have a race to the door of the [[Octopod]]. Kwazii arrives at the door first, but is stuck at the point of opening it, so Barnacles helps instead. However, when they first opened the door, no one was there but when they closed the door the banging continued. So they opened the door eventually finding that a [[Sea Snails|sea snail]] was at the door. The snail expresses his troubles to the two telling them some kind of half crab half sea urchin is keeping all the sea snails awake. Both Kwazii and Barnacles want to sort out the problem so they have a race to the [[List of Gups|Gups]] and then to the reef. === '''Arguing Halfs''' === Barnacles wins the race by going down the quickest route. The snail then shows both of them the creature who's making the noise which to no surprise is arguing with itself, but Barnacles and Kwazii don't know what the creature is and so decide to contact a sleepy [[Shellington Sea Otter|Shellington]]. Shellington tells them that the creature is two creatures a crab with a [[Sea Urchin|sea urchin]] stuck to its back as a process of symbiosis as both creatures rely on each other for food and protection. Barnacles tries to get their attention but they start arguing about who the problem is. Kwazii suggests splitting the two apart just for a bit the urchin and crab agree. Kwazii takes the urchin to the other side of the reef while the crab stays on a rock telling Barnacles that he's fine on his own, but the crab gets scared away by a lobster so Barnacles decides to teach the crab how to protect himself. === '''Separation''' === Meanwhile Kwazii tries to find a spot for the urchin to stay but almost all areas according to the urchin do not have enough food for him. The urchin once finding a good spot asks Kwazii if he has any snacks which he does not so the urchin then asks Kwazii what the plan is, but Kwazii doesn't have a plan. But he knows someone who does and goes to find Barnacles. Barnacles tries to teach the crab that it's about attitude and confidence but the crab can't make himself look scary. So they decide to look for Kwazii. === '''Back Together''' === Barnacles and Kwazii then bump into each other while looking for each other resulting in the urchin and crab reuniting back together. Both the crab and urchin realize how important each other are. And so the episode end with Captain Barnacles and Kwazii racing each other back to the Octopod in the [[Gup-D]] and [[Gup-B]]. ==Creature Report == *A [[Blue Crab|crab]] and a [[Sea Urchin|sea urchin]] ==Trivia/Goofs== *[[Inkling|Professor Inkling]] and the [[Vegimals]] are not in this episode.  *When [[Dashi]] is shown inside the Octo-Alert, her headphones are missing.  *Parallel: Barnacles and Kwazii were having the same problem the crab and urchin were having. Competing or racing with each other to see who gets a task done faster. They all soon realize that working together is always vital. *The crab in this episode is supposed to be a carrier crab, but he instead looks like a blue crab. [[Category:剧集]] [[Category:第一季]] b9c4875cebab4e6ce5f0e7141a1a5e0dfd28f654 110 104 2022-09-30T15:05:17Z Richard Robin 2 修正谬误 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与螃蟹海胆</big><br><small>The Octonauts and the Crab and Urchin</small> | image = Crab and urchin title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #849cc8 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月7日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与海底风暴|海底风暴]](英文版)<br> [[海底小纵队与怪兽地图|怪兽地图]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与海象首领|海象首领]](英文版)<br> [[海底小纵队与白化座头鲸|白化座头鲸]](中文版)}} |} '''海底小纵队与螃蟹海胆'''("The Octonauts and the Crab and Urchin")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中为第1季第3集<ref>{{cite web | title = The Crab and Urchin Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Crab_and_Urchin | date = 2022-09-30 | archiveurl = http://archive.today/ptdI7 | archivedate = 2022-09-30 }}</ref>,中文版为第1季第8集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] (不完全,待补全) == Synopsis == === '''Someone's at the Door''' === The episode starts with [[Kwazii Cat|Kwazii]] and [[Captain Barnacles]] waking up to a loud banging noise. The two decide to have a race to the door of the [[Octopod]]. Kwazii arrives at the door first, but is stuck at the point of opening it, so Barnacles helps instead. However, when they first opened the door, no one was there but when they closed the door the banging continued. So they opened the door eventually finding that a [[Sea Snails|sea snail]] was at the door. The snail expresses his troubles to the two telling them some kind of half crab half sea urchin is keeping all the sea snails awake. Both Kwazii and Barnacles want to sort out the problem so they have a race to the [[List of Gups|Gups]] and then to the reef. === '''Arguing Halfs''' === Barnacles wins the race by going down the quickest route. The snail then shows both of them the creature who's making the noise which to no surprise is arguing with itself, but Barnacles and Kwazii don't know what the creature is and so decide to contact a sleepy [[Shellington Sea Otter|Shellington]]. Shellington tells them that the creature is two creatures a crab with a [[Sea Urchin|sea urchin]] stuck to its back as a process of symbiosis as both creatures rely on each other for food and protection. Barnacles tries to get their attention but they start arguing about who the problem is. Kwazii suggests splitting the two apart just for a bit the urchin and crab agree. Kwazii takes the urchin to the other side of the reef while the crab stays on a rock telling Barnacles that he's fine on his own, but the crab gets scared away by a lobster so Barnacles decides to teach the crab how to protect himself. === '''Separation''' === Meanwhile Kwazii tries to find a spot for the urchin to stay but almost all areas according to the urchin do not have enough food for him. The urchin once finding a good spot asks Kwazii if he has any snacks which he does not so the urchin then asks Kwazii what the plan is, but Kwazii doesn't have a plan. But he knows someone who does and goes to find Barnacles. Barnacles tries to teach the crab that it's about attitude and confidence but the crab can't make himself look scary. So they decide to look for Kwazii. === '''Back Together''' === Barnacles and Kwazii then bump into each other while looking for each other resulting in the urchin and crab reuniting back together. Both the crab and urchin realize how important each other are. And so the episode end with Captain Barnacles and Kwazii racing each other back to the Octopod in the [[Gup-D]] and [[Gup-B]]. ==Creature Report == *A [[Blue Crab|crab]] and a [[Sea Urchin|sea urchin]] ==Trivia/Goofs== *[[Inkling|Professor Inkling]] and the [[Vegimals]] are not in this episode.  *When [[Dashi]] is shown inside the Octo-Alert, her headphones are missing.  *Parallel: Barnacles and Kwazii were having the same problem the crab and urchin were having. Competing or racing with each other to see who gets a task done faster. They all soon realize that working together is always vital. *The crab in this episode is supposed to be a carrier crab, but he instead looks like a blue crab. [[Category:剧集]] [[Category:第一季]] f903edaf17792729bbdcc8e7805f10e7589ae009 111 110 2022-09-30T15:06:37Z Richard Robin 2 修正谬误 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与螃蟹海胆</big><br><small>The Octonauts and the Crab and Urchin</small> | image = Crab and urchin title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #849cc8 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月6日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与海底风暴|海底风暴]](英文版)<br> [[海底小纵队与怪兽地图|怪兽地图]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与海象首领|海象首领]](英文版)<br> [[海底小纵队与白化座头鲸|白化座头鲸]](中文版)}} |} '''海底小纵队与螃蟹海胆'''("The Octonauts and the Crab and Urchin")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中为第1季第3集<ref>{{cite web | title = The Crab and Urchin Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Crab_and_Urchin | date = 2022-09-30 | archiveurl = http://archive.today/ptdI7 | archivedate = 2022-09-30 }}</ref>,中文版为第1季第8集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] (不完全,待补全) == Synopsis == === '''Someone's at the Door''' === The episode starts with [[Kwazii Cat|Kwazii]] and [[Captain Barnacles]] waking up to a loud banging noise. The two decide to have a race to the door of the [[Octopod]]. Kwazii arrives at the door first, but is stuck at the point of opening it, so Barnacles helps instead. However, when they first opened the door, no one was there but when they closed the door the banging continued. So they opened the door eventually finding that a [[Sea Snails|sea snail]] was at the door. The snail expresses his troubles to the two telling them some kind of half crab half sea urchin is keeping all the sea snails awake. Both Kwazii and Barnacles want to sort out the problem so they have a race to the [[List of Gups|Gups]] and then to the reef. === '''Arguing Halfs''' === Barnacles wins the race by going down the quickest route. The snail then shows both of them the creature who's making the noise which to no surprise is arguing with itself, but Barnacles and Kwazii don't know what the creature is and so decide to contact a sleepy [[Shellington Sea Otter|Shellington]]. Shellington tells them that the creature is two creatures a crab with a [[Sea Urchin|sea urchin]] stuck to its back as a process of symbiosis as both creatures rely on each other for food and protection. Barnacles tries to get their attention but they start arguing about who the problem is. Kwazii suggests splitting the two apart just for a bit the urchin and crab agree. Kwazii takes the urchin to the other side of the reef while the crab stays on a rock telling Barnacles that he's fine on his own, but the crab gets scared away by a lobster so Barnacles decides to teach the crab how to protect himself. === '''Separation''' === Meanwhile Kwazii tries to find a spot for the urchin to stay but almost all areas according to the urchin do not have enough food for him. The urchin once finding a good spot asks Kwazii if he has any snacks which he does not so the urchin then asks Kwazii what the plan is, but Kwazii doesn't have a plan. But he knows someone who does and goes to find Barnacles. Barnacles tries to teach the crab that it's about attitude and confidence but the crab can't make himself look scary. So they decide to look for Kwazii. === '''Back Together''' === Barnacles and Kwazii then bump into each other while looking for each other resulting in the urchin and crab reuniting back together. Both the crab and urchin realize how important each other are. And so the episode end with Captain Barnacles and Kwazii racing each other back to the Octopod in the [[Gup-D]] and [[Gup-B]]. ==Creature Report == *A [[Blue Crab|crab]] and a [[Sea Urchin|sea urchin]] ==Trivia/Goofs== *[[Inkling|Professor Inkling]] and the [[Vegimals]] are not in this episode.  *When [[Dashi]] is shown inside the Octo-Alert, her headphones are missing.  *Parallel: Barnacles and Kwazii were having the same problem the crab and urchin were having. Competing or racing with each other to see who gets a task done faster. They all soon realize that working together is always vital. *The crab in this episode is supposed to be a carrier crab, but he instead looks like a blue crab. [[Category:剧集]] [[Category:第一季]] b9c4875cebab4e6ce5f0e7141a1a5e0dfd28f654 呱唧 0 44 105 62 2022-09-30T13:34:06Z Richard Robin 2 更新信息栏 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>呱唧</big><br>Kwazii | image = Kwazii Cat 2.png | width = 300px | bgcolor = #FFBB77 | subtitle = }} {{Simpleboxdata|label=性别|data=男}} {{Simpleboxdata|label=物种|data=猫}} {{Simpleboxdata|label=颜色|data=橘色}} {{Simpleboxdata|label=职业|data=中尉和海盗}} {{Simpleboxdata|label=居住地|data=[[章鱼堡]]}} {{Simpleboxdata|label=最喜欢的舰艇|data=[[虎鲨艇]]}} {{Simpleboxdata|label=初次露面|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>[[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=[[Above and Beyond Season 2]]}} {{Simpleboxdata|label=配音演员|Rob Rackstraw}} |} 呱唧(Kwazii)是一只冲动的橘色小猫,有过一段神秘的海盗生涯,他的爷爷是咔嚓船长。他性格豪放,常常会讲起自己曾经的海盗经历。若要问他从哪里来,你很可能被告知一个在地图上根本找不到的地方。那为何巴克队长还要任命这位有着可疑背景的海盗为小队中尉呢?<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:男 *物种:橘猫 *年龄:约30多岁 *职务:中尉 *别称:呱唧猫、呱唧叔叔 *关系:巴克队长(队长、搭档、伙伴)、皮索(同事)、突突兔(伙伴)、咔嚓船长(爷爷、偶像) == 介绍 == 容易冲动的小猫有过一段神秘的海盗生涯,他的爷爷是咔嚓船长。口头禅是“Yeow!”,坐骑是虎鲨艇(GUP-B),会撒娇、怕冷、怕痒、怕蜘蛛、他的尾巴很敏感。两次被巴克队长公主抱,一次被谢灵通公主抱。无论犯什么错队长都会原谅他。 他性格豪放,常常会讲起自己曾经的海盗经历。若要问他从哪里来,你很可能被告知一个在地图上根本找不到的地方。那为何巴克队长还要任命这位有着可疑背景的海盗为小队中尉呢? 但可以确定的是,呱唧是一只非常勇敢的小猫。他天生就是一个探险家,喜欢冒险和新鲜事物。作为海盗,他的动力更多地源自对探险的热爱,而不是对财宝的追求。每次探险,呱唧都会带着他的口头禅““yeow(呀哦)”一路活蹦乱跳,斗志昂扬。他把任何情形都变成了一次大胆冒险的机会。虽然他是只猫咪,但他从不吃鱼(毕竟这部动漫没有食物链这么一说,大家吃鱼饼干就能饱)。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:猫]] 4346ddc4f73ca7498257706959bc10a7bae77f65 129 105 2022-10-04T10:23:30Z Richard Robin 2 bug wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>呱唧</big><br>Kwazii | image = Kwazii Cat 2.png | width = 300px | bgcolor = #FFBB77 | subtitle = }} {{Simpleboxdata|label=性别|data=男}} {{Simpleboxdata|label=物种|data=猫}} {{Simpleboxdata|label=颜色|data=橘色}} {{Simpleboxdata|label=职业|data=中尉和海盗}} {{Simpleboxdata|label=居住地|data=[[章鱼堡]]}} {{Simpleboxdata|label=最喜欢的舰艇|data=[[虎鲨艇]]}} {{Simpleboxdata|label=初次露面|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>[[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=[[Above and Beyond Season 2]]}} {{Simpleboxdata|label=配音演员|data=Rob Rackstraw}} |} 呱唧(Kwazii)是一只冲动的橘色小猫,有过一段神秘的海盗生涯,他的爷爷是咔嚓船长。他性格豪放,常常会讲起自己曾经的海盗经历。若要问他从哪里来,你很可能被告知一个在地图上根本找不到的地方。那为何巴克队长还要任命这位有着可疑背景的海盗为小队中尉呢?<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:男 *物种:橘猫 *年龄:约30多岁 *职务:中尉 *别称:呱唧猫、呱唧叔叔 *关系:巴克队长(队长、搭档、伙伴)、皮索(同事)、突突兔(伙伴)、咔嚓船长(爷爷、偶像) == 介绍 == 容易冲动的小猫有过一段神秘的海盗生涯,他的爷爷是咔嚓船长。口头禅是“Yeow!”,坐骑是虎鲨艇(GUP-B),会撒娇、怕冷、怕痒、怕蜘蛛、他的尾巴很敏感。两次被巴克队长公主抱,一次被谢灵通公主抱。无论犯什么错队长都会原谅他。 他性格豪放,常常会讲起自己曾经的海盗经历。若要问他从哪里来,你很可能被告知一个在地图上根本找不到的地方。那为何巴克队长还要任命这位有着可疑背景的海盗为小队中尉呢? 但可以确定的是,呱唧是一只非常勇敢的小猫。他天生就是一个探险家,喜欢冒险和新鲜事物。作为海盗,他的动力更多地源自对探险的热爱,而不是对财宝的追求。每次探险,呱唧都会带着他的口头禅““yeow(呀哦)”一路活蹦乱跳,斗志昂扬。他把任何情形都变成了一次大胆冒险的机会。虽然他是只猫咪,但他从不吃鱼(毕竟这部动漫没有食物链这么一说,大家吃鱼饼干就能饱)。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:猫]] fec692dd081a3abb83b3badd9e869ede33df7a7b File:海底小纵队维基图标.png 6 71 106 2022-09-30T13:48:10Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b File:Walrus chief title card.jpg 6 72 107 2022-09-30T14:55:47Z Richard Robin 2 Walrus_chief wikitext text/x-wiki == 摘要 == Walrus_chief == 许可协议 == {{Copyright}} 2c0636dc8b0287945aaaf3d8f2fd605c1bcfff31 海底小纵队与海象首领 0 73 108 2022-09-30T15:03:02Z Richard Robin 2 创建页面,内容为“{{Simpleboxtop | title = | toptext = <big>海底小纵队与海象首领</big><br>The Octonauts and the Walrus Chief | image = Walrus chief title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #849cc8 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月6日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=海底小纵队与…” wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与海象首领</big><br>The Octonauts and the Walrus Chief | image = Walrus chief title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #849cc8 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月6日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与螃蟹海胆|螃蟹海胆]](英文版)<br> [[海底小纵队与逃离海藻行动|逃离海藻行动]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与小飞鱼|小飞鱼]]}} |} '''海底小纵队与海象首领'''("The Octonauts and the Walrus Chief")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版和中文版中皆为第1季第4集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] *[[小萝卜]] (不完全,待补全) == Summary == A walrus steals [[Peso]]'s medical bag and mistakes it for a funny-looking white clam. The Octonauts travel inside a walrus colony, but the walruses don't let them enter as it is a walrus-only territory. [[Captain Barnacles]], [[Kwazii]] and Peso think of another plan to get the medical bag - by disguising themselves as a walrus, but when they’re exposed, they soon find themselves face-to-face with the colony's walrus chief who has a twisted flipper and has been relying on the other walruses to bring him food since he can't swim. == Plot == ==Creature Report== * [[Walrus]] ==Trivia== * [[Dashi]] and [[Tunip the Vegimal|Tunip]] are non-speaking characters during the episode until the end. * In reality, a group of walruses is known as a herd. [[Category:剧集]] [[Category:第一季]] 0f9eba1b31a5c5241cadda9110ca7b10ffb5b781 109 108 2022-09-30T15:03:27Z Richard Robin 2 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与海象首领</big><br>The Octonauts and the Walrus Chief | image = Walrus chief title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #9bccdd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月6日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与螃蟹海胆|螃蟹海胆]](英文版)<br> [[海底小纵队与逃离海藻行动|逃离海藻行动]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与小飞鱼|小飞鱼]]}} |} '''海底小纵队与海象首领'''("The Octonauts and the Walrus Chief")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版和中文版中皆为第1季第4集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] *[[小萝卜]] (不完全,待补全) == Summary == A walrus steals [[Peso]]'s medical bag and mistakes it for a funny-looking white clam. The Octonauts travel inside a walrus colony, but the walruses don't let them enter as it is a walrus-only territory. [[Captain Barnacles]], [[Kwazii]] and Peso think of another plan to get the medical bag - by disguising themselves as a walrus, but when they’re exposed, they soon find themselves face-to-face with the colony's walrus chief who has a twisted flipper and has been relying on the other walruses to bring him food since he can't swim. == Plot == ==Creature Report== * [[Walrus]] ==Trivia== * [[Dashi]] and [[Tunip the Vegimal|Tunip]] are non-speaking characters during the episode until the end. * In reality, a group of walruses is known as a herd. [[Category:剧集]] [[Category:第一季]] e7887c4885ffd209ef9b3377679cad572a0b8e0d 112 109 2022-09-30T15:06:52Z Richard Robin 2 修正谬误 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与海象首领</big><br>The Octonauts and the Walrus Chief | image = Walrus chief title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #9bccdd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月7日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与螃蟹海胆|螃蟹海胆]](英文版)<br> [[海底小纵队与逃离海藻行动|逃离海藻行动]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与小飞鱼|小飞鱼]]}} |} '''海底小纵队与海象首领'''("The Octonauts and the Walrus Chief")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版和中文版中皆为第1季第4集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] *[[小萝卜]] (不完全,待补全) == Summary == A walrus steals [[Peso]]'s medical bag and mistakes it for a funny-looking white clam. The Octonauts travel inside a walrus colony, but the walruses don't let them enter as it is a walrus-only territory. [[Captain Barnacles]], [[Kwazii]] and Peso think of another plan to get the medical bag - by disguising themselves as a walrus, but when they’re exposed, they soon find themselves face-to-face with the colony's walrus chief who has a twisted flipper and has been relying on the other walruses to bring him food since he can't swim. == Plot == ==Creature Report== * [[Walrus]] ==Trivia== * [[Dashi]] and [[Tunip the Vegimal|Tunip]] are non-speaking characters during the episode until the end. * In reality, a group of walruses is known as a herd. [[Category:剧集]] [[Category:第一季]] ee218aa7b19df536e5216ce7cdcc40d74208a98f File:The Flying Fish.jpg 6 74 113 2022-09-30T15:11:39Z Richard Robin 2 The_Flying_Fish wikitext text/x-wiki == 摘要 == The_Flying_Fish == 许可协议 == {{Copyright}} d9c4912efb4a9aaa9be30d489f28fd84a3fa3640 海底小纵队与小飞鱼 0 75 114 2022-09-30T15:15:42Z Richard Robin 2 创建页面,内容为“{{Simpleboxtop | title = | toptext = <big>海底小纵队与小飞鱼</big><br>The Octonauts and the Flying Fish | image = The_Flying_Fish.jpg | width = 300px | imgwidth = 300px | bgcolor = #9bb4ed | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月8日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=海底小纵队与海象首领|…” wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与小飞鱼</big><br>The Octonauts and the Flying Fish | image = The_Flying_Fish.jpg | width = 300px | imgwidth = 300px | bgcolor = #9bb4ed | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月8日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与海象首领|海象首领]]}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与大王乌贼|大王乌贼]](英文版)<br> [[海底小纵队与独角鲸|独角鲸]](中文版)}} |} '''海底小纵队与小飞鱼'''("The Octonauts and the Flying Fish")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版和中文版中皆为第1季第5集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> == Summary == [[Inkling|Professor Inkling]] shows [[Shellington Sea Otter|Shellington]], [[Captain Barnacles]] and [[Kwazii Cat|Kwazii]] an old journal that belonged to Inkling's grandfather that shows a missing page. As the [[Octonauts]] travel above the ocean a school of flying fish appear and accidentally steal Shellington's waterproof satchel, which had the professor's book inside, as [[Kwazii]] in his upgraded [[Gup-B]] with flying fish mode tries to retrieve the satchel. == Plot == ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[突突兔]] *[[章教授]] ==Creature Report== *Flying Fish ==Trivia/Goofs== *The Gup-B gets its first upgrade: Flying Fish Mode. *When Peso activates his helmet, there is a rendering error on his flipper and his collar. [[Category:剧集]] [[Category:第一季]] bea0578afa6d8eafc7ec547b4b645b5689a7949c Template:Template link expanded 10 842 1643 2022-09-30T18:48:13Z Pppery 34 wikitext text/x-wiki <code><nowiki>{{</nowiki>{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}<!-- -->[[{{{sister|{{{SISTER|}}}}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!-- -->{{#if:{{{2|}}} |&#124;{{{2}}}}}<!-- -->{{#if:{{{3|}}} |&#124;{{{3}}}}}<!-- -->{{#if:{{{4|}}} |&#124;{{{4}}}}}<!-- -->{{#if:{{{5|}}} |&#124;{{{5}}}}}<!-- -->{{#if:{{{6|}}} |&#124;{{{6}}}}}<!-- -->{{#if:{{{7|}}} |&#124;{{{7}}}}}<!-- -->{{#if:{{{8|}}} |&#124;{{{8}}}}}<!-- -->{{#if:{{{9|}}} |&#124;{{{9}}}}}<!-- -->{{#if:{{{10|}}} |&#124;{{{10}}}}}<!-- -->{{#if:{{{11|}}} |&#124;{{{11}}}}}<!-- -->{{#if:{{{12|}}} |&#124;{{{12}}}}}<!-- -->{{#if:{{{13|}}} |&#124;{{{13}}}}}<!-- -->{{#if:{{{14|}}} |&#124;{{{14}}}}}<!-- -->{{#if:{{{15|}}} |&#124;{{{15}}}}}<!-- -->{{#if:{{{16|}}} |&#124;{{{16}}}}}<!-- -->{{#if:{{{17|}}} |&#124;{{{17}}}}}<!-- -->{{#if:{{{18|}}} |&#124;{{{18}}}}}<!-- -->{{#if:{{{19|}}} |&#124;{{{19}}}}}<!-- -->{{#if:{{{20|}}} |&#124;{{{20}}}}}<!-- -->{{#if:{{{21|}}} |&#124;''...''}}<!-- --><nowiki>}}</nowiki></code><noinclude> {{Documentation}} </noinclude> 9f670205d4b358df089b1a820f78f02a88afca3a File:The giant squid title card.png 6 76 115 2022-10-01T02:01:45Z Richard Robin 2 The_giant_squid wikitext text/x-wiki == 摘要 == The_giant_squid == 许可协议 == {{Copyright}} 9616bfcf75e6b91fc17b0d225fb4a39fe8ec810a File:海底小纵队维基左侧图标(测试).svg 6 77 116 2022-10-01T02:14:37Z Richard Robin 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:海底小纵队维基标题.svg 6 78 117 2022-10-01T02:27:26Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{可自由使用}} 75cf638105497fc637af400819e054eb58427131 Module:Yesno 828 848 1657 2022-10-01T17:25:37Z Pppery 34 Pppery moved page [[Module:Yesno/2]] to [[Module:Yesno]] without leaving a redirect Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:No globals 828 847 1655 2022-10-01T17:28:48Z Pppery 34 Pppery moved page [[Module:No globals/2]] to [[Module:No globals]] without leaving a redirect Scribunto text/plain local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then error('Tried to read nil global ' .. tostring(k), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error('Tried to write global ' .. tostring(k), 2) end rawset(t, k, v) end setmetatable(_G, mt) 8ce3969f7d53b08bd00dabe4cc9780bc6afd412a Module:Documentation/config 828 839 1637 2022-10-01T17:37:53Z Pppery 34 Pppery moved page [[Module:Documentation/config/2]] to [[Module:Documentation/config]] without leaving a redirect Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[w:Wikipedia:Template documentation|documentation]] is [[mw:Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[mw:Extension:Scribunto/Lua reference manual|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg d70e8b1402a2bbe08a1fef4b75d743e661af0c95 Template:Documentation subpage 10 836 1631 2022-10-01T17:51:17Z Pppery 34 wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = '''This is a documentation subpage''' for '''{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.<br/> It contains usage information, [[mw:Help:Categories|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} | page}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 471e685c1c643a5c6272e20e49824fffebad0448 Template:Navbox 10 79 118 2022-10-04T09:30:47Z Richard Robin 2 创建页面,内容为“<includeonly><!-- 请不要擅自在讨论前更改本模板的任何内容。本模板应用广泛,错误设置易导致全站崩溃。 -->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table class="navbox {{{class|}}}" cellspacing="0" style="{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">}}<!-- --><table cellspacing="0" class="nowraplinks {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|#default=mw-collapsible {{#i…” wikitext text/x-wiki <includeonly><!-- 请不要擅自在讨论前更改本模板的任何内容。本模板应用广泛,错误设置易导致全站崩溃。 -->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table class="navbox {{{class|}}}" cellspacing="0" style="{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">}}<!-- --><table cellspacing="0" class="nowraplinks {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|#default=mw-collapsible {{#if:{{{state|}}}|{{{state}}}|autocollapse}}}}}} {{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=navbox-subgroup" style="display:table;width:100%;{{{bodystyle|}}};{{{style|}}}|#default=" style="display:table;width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};"><!-- ---Title and Navbar--- -->{{#if:{{{title|}}}|<tr>{{#if:{{{titlegroup|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}"><!-- -->{{{titlegroup|}}}</td><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!-- -->colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} <!-- -->class="navbox-title"><!-- -->{{#if:{{#switch:{{{navbar|}}}|plain|off=1}}<!-- -->{{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}|<!-- -->{{#ifeq:{{{navbar|}}}|off|{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:2.78em;">&nbsp;</div>}}|<!-- -->{{#ifeq:{{{state|}}}|plain||<div style="float:left; width:2.78em;text-align:left;">&nbsp;</div>}}}}|<!-- --><div style="float:left; width:2.78em;text-align:left;"><span class="mobileonly">&nbsp;</span><!-- -->{{Navbar|{{{name}}}|fontstyle={{{basestyle|}}};{{{titlestyle|}}};border:none;|mini=1}}<!-- --></div>{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:2.78em;">&nbsp;</div>}}}}<!-- --><span style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"><!-- -->{{{title}}}</span></th></tr>}}<!-- ---Above--- -->{{#if:{{{above|}}}|<!-- -->{{#if:{{{title|}}}|<tr style="height:2px;"><td></td></tr>}}<!-- --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" <!-- -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{above}}}</td></tr>}}<!-- ---Body--- ---First group/list and images--- -->{{#if:{{{list1|}}}|{{#if:{{{title|}}}{{{above|}}}|<tr style="height:2px;"><td></td></tr>}}<tr><!-- -->{{#if:{{{imageleft|}}}|<!-- --><td style="width:0%;padding:0px 2px 0px 0px;{{{imageleftstyle|}}}" <!-- -->rowspan={{#expr:1{{#if:{{{list2|}}}|+2}}{{#if:{{{list3|}}}|+2}}{{#if:{{{list4|}}}|+2}}<!-- -->{{#if:{{{list5|}}}|+2}}{{#if:{{{list6|}}}|+2}}{{#if:{{{list7|}}}|+2}}{{#if:{{{list8|}}}|+2}}<!-- -->{{#if:{{{list9|}}}|+2}}{{#if:{{{list10|}}}|+2}}{{#if:{{{list11|}}}|+2}}{{#if:{{{list12|}}}|+2}}<!-- -->{{#if:{{{list13|}}}|+2}}{{#if:{{{list14|}}}|+2}}{{#if:{{{list15|}}}|+2}}{{#if:{{{list16|}}}|+2}}<!-- -->{{#if:{{{list17|}}}|+2}}{{#if:{{{list18|}}}|+2}}{{#if:{{{list19|}}}|+2}}{{#if:{{{list20|}}}|+2}}<!-- -->{{#if:{{{list21|}}}|+2}}{{#if:{{{list22|}}}|+2}}}}><!-- -->{{{imageleft|}}}</td>}}<!-- -->{{#if:{{{group1|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group1style|}}}"><!-- -->{{{group1}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list1style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{list1padding|{{{listpadding|0 0.25em}}}}}}">{{{list1}}}</div></td><!-- -->{{#if:{{{image|}}}|<!-- --><td style="width:0%;padding:0px 0px 0px 2px;{{{imagestyle|}}}" <!-- -->rowspan={{#expr:1{{#if:{{{list2|}}}|+2}}{{#if:{{{list3|}}}|+2}}{{#if:{{{list4|}}}|+2}}<!-- -->{{#if:{{{list5|}}}|+2}}{{#if:{{{list6|}}}|+2}}{{#if:{{{list7|}}}|+2}}{{#if:{{{list8|}}}|+2}}<!-- -->{{#if:{{{list9|}}}|+2}}{{#if:{{{list10|}}}|+2}}{{#if:{{{list11|}}}|+2}}{{#if:{{{list12|}}}|+2}}<!-- -->{{#if:{{{list13|}}}|+2}}{{#if:{{{list14|}}}|+2}}{{#if:{{{list15|}}}|+2}}{{#if:{{{list16|}}}|+2}}<!-- -->{{#if:{{{list17|}}}|+2}}{{#if:{{{list18|}}}|+2}}{{#if:{{{list19|}}}|+2}}{{#if:{{{list20|}}}|+2}}<!-- -->{{#if:{{{list21|}}}|+2}}{{#if:{{{list22|}}}|+2}}}}><!-- -->{{{image|}}}</td>}}<!-- --></tr>}}<!-- ---Remaining groups/lists--- -->{{#if:{{{list2|}}}|<!-- -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- -->{{#if:{{{group2|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group2style|}}}"><!-- -->{{{group2}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list2style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list2}}}</div></td></tr>}}<!-- -->{{#if:{{{list3|}}}|<!-- -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- -->{{#if:{{{group3|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group3style|}}}"><!-- -->{{{group3}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list3style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list3}}}</div></td></tr>}}<!-- -->{{#if:{{{list4|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group4|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group4style|}}}"><!-- -->{{{group4}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list4style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list4}}}</div></td></tr>}}<!-- -->{{#if:{{{list5|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group5|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group5style|}}}"><!-- -->{{{group5}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list5style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list5}}}</div></td></tr>}}<!-- -->{{#if:{{{list6|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group6|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group6style|}}}"><!-- -->{{{group6}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list6style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list6}}}</div></td></tr>}}<!-- -->{{#if:{{{list7|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group7|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group7style|}}}"><!-- -->{{{group7}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list7style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list7}}}</div></td></tr>}}<!-- -->{{#if:{{{list8|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group8|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group8style|}}}"><!-- -->{{{group8}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list8style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list8}}}</div></td></tr>}}<!-- -->{{#if:{{{list9|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group9|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group9style|}}}"><!-- -->{{{group9}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list9style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list9}}}</div></td></tr>}}<!-- -->{{#if:{{{list10|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group10|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group10style|}}}"><!-- -->{{{group10}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list10style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list10}}}</div></td></tr>}}<!-- -->{{#if:{{{list11|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group11|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group11style|}}}"><!-- -->{{{group11}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list11style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list11}}}</div></td></tr>}}<!-- -->{{#if:{{{list12|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group12|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group12style|}}}"><!-- -->{{{group12}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list12style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list12}}}</div></td></tr>}}<!-- -->{{#if:{{{list13|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group13|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group13style|}}}"><!-- -->{{{group13}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list13style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list13}}}</div></td></tr>}}<!-- -->{{#if:{{{list14|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group14|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group14style|}}}"><!-- -->{{{group14}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list14style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list14}}}</div></td></tr>}}<!-- -->{{#if:{{{list15|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group15|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group15style|}}}"><!-- -->{{{group15}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list15style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list15}}}</div></td></tr>}}<!-- -->{{#if:{{{list16|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group16|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group16style|}}}"><!-- -->{{{group16}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list16style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list16}}}</div></td></tr>}}<!-- -->{{#if:{{{list17|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group17|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group17style|}}}"><!-- -->{{{group17}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list17style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list17}}}</div></td></tr>}}<!-- -->{{#if:{{{list18|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group18|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group18style|}}}"><!-- -->{{{group18}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list18style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list18}}}</div></td></tr>}}<!-- -->{{#if:{{{list19|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group19|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group19style|}}}"><!-- -->{{{group19}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list19style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list19}}}</div></td></tr>}}<!-- -->{{#if:{{{list20|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group20|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group20style|}}}"><!-- -->{{{group20}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list20style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list20}}}</div></td></tr>}}<!-- -->{{#if:{{{list21|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group21|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group21style|}}}"><!-- -->{{{group21}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list21style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list21}}}</div></td></tr>}}<!-- -->{{#if:{{{list22|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group22|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group22style|}}}"><!-- -->{{{group22}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list22style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list22}}}</div></td></tr>}}<!-- -->{{#if:{{{list23|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group23|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group23style|}}}"><!-- -->{{{group23}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list23style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list23}}}</div></td></tr>}}<!-- -->{{#if:{{{list24|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group24|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group24style|}}}"><!-- -->{{{group24}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list24style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list24}}}</div></td></tr>}}<!-- -->{{#if:{{{list25|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group25|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group25style|}}}"><!-- -->{{{group25}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list25style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list25}}}</div></td></tr>}}<!-- -->{{#if:{{{list26|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group26|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group26style|}}}"><!-- -->{{{group26}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list26style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list26}}}</div></td></tr>}}<!-- -->{{#if:{{{list27|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group27|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group27style|}}}"><!-- -->{{{group27}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list27style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list27}}}</div></td></tr>}}<!-- -->{{#if:{{{list28|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group28|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group28style|}}}"><!-- -->{{{group28}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list28style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list28}}}</div></td></tr>}}<!-- -->{{#if:{{{list29|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group29|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group29style|}}}"><!-- -->{{{group29}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list29style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list29}}}</div></td></tr>}}<!-- -->{{#if:{{{list30|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group30|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group30style|}}}"><!-- -->{{{group30}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list30style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list30}}}</div></td></tr>}}<!-- -->{{#if:{{{list31|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group31|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group31style|}}}"><!-- -->{{{group31}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list31style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list31}}}</div></td></tr>}}<!-- -->{{#if:{{{list32|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group32|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group32style|}}}"><!-- -->{{{group32}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list32style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list32}}}</div></td></tr>}}<!-- -->{{#if:{{{list33|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group33|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group33style|}}}"><!-- -->{{{group33}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list33style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list33}}}</div></td></tr>}}<!-- -->{{#if:{{{list34|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group34|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group34style|}}}"><!-- -->{{{group34}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list34style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list34}}}</div></td></tr>}}<!-- -->{{#if:{{{list35|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group35|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group35style|}}}"><!-- -->{{{group35}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list35style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list35}}}</div></td></tr>}}<!-- -->{{#if:{{{list36|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group36|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group36style|}}}"><!-- -->{{{group36}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list36style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list36}}}</div></td></tr>}}<!-- -->{{#if:{{{list37|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group37|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group37style|}}}"><!-- -->{{{group37}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list37style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list37}}}</div></td></tr>}}<!-- -->{{#if:{{{list38|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group38|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group38style|}}}"><!-- -->{{{group38}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list38style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list38}}}</div></td></tr>}}<!-- -->{{#if:{{{list39|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group39|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group39style|}}}"><!-- -->{{{group39}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list39style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list39}}}</div></td></tr>}}<!-- -->{{#if:{{{list40|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group40|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group40style|}}}"><!-- -->{{{group40}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list40style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list40}}}</div></td></tr>}}<!-- -->{{#if:{{{list41|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group41|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group41style|}}}"><!-- -->{{{group41}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list41style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list41}}}</div></td></tr>}}<!-- -->{{#if:{{{list42|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group42|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group42style|}}}"><!-- -->{{{group42}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list42style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list42}}}</div></td></tr>}}<!-- -->{{#if:{{{list43|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group43|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group43style|}}}"><!-- -->{{{group43}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list43style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list43}}}</div></td></tr>}}<!-- -->{{#if:{{{list44|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group44|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group44style|}}}"><!-- -->{{{group44}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list44style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list44}}}</div></td></tr>}}<!-- -->{{#if:{{{list45|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group45|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group45style|}}}"><!-- -->{{{group45}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list45style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list45}}}</div></td></tr>}}<!-- -->{{#if:{{{list46|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group46|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group46style|}}}"><!-- -->{{{group46}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list46style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list46}}}</div></td></tr>}}<!-- -->{{#if:{{{list47|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group47|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group47style|}}}"><!-- -->{{{group47}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list47style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list47}}}</div></td></tr>}}<!-- -->{{#if:{{{list48|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group48|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group48style|}}}"><!-- -->{{{group48}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list48style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list48}}}</div></td></tr>}}<!-- -->{{#if:{{{list49|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group49|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group49style|}}}"><!-- -->{{{group49}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list49style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list49}}}</div></td></tr>}}<!-- -->{{#if:{{{list50|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group50|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group50style|}}}"><!-- -->{{{group50}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list50style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list50}}}</div></td></tr>}}<!-- ---Below--- -->{{#if:{{{below|}}}|<!-- -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<tr style="height:2px;"><td></td></tr>}}<!-- --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" <!-- -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{below}}}</td></tr>}}<!-- --></table>{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=<div>|none=|#default=</td></tr></table>}}<!-- --></includeonly><noinclude> {{documentation}} <!-- 请将分类与跨语言链结增加在/doc子页面 / 請將分類與跨語言連結增加在/doc子頁面 --> </noinclude> 961a66db4bef06739d50fecd2c6c51c7544965e9 Template:Coloredlink 10 80 119 2022-10-04T09:33:52Z Richard Robin 2 创建页面,内容为“<includeonly>[[:{{{2}}}|<span style="color:{{{1}}}">{{{3|{{{2}}}}}}</span>]]</includeonly><noinclude> {{Documentation}}[[Category:格式模板]]</noinclude>” wikitext text/x-wiki <includeonly>[[:{{{2}}}|<span style="color:{{{1}}}">{{{3|{{{2}}}}}}</span>]]</includeonly><noinclude> {{Documentation}}[[Category:格式模板]]</noinclude> b1670654b2f144cfd8fd4c31fa23dae8eed047a4 Template:Navbar 10 81 120 2022-10-04T09:34:20Z Richard Robin 2 创建页面,内容为“<includeonly><!-- -->{{#if:{{{nodiv|}}} |<!--then: -->&nbsp;<span class="noprint plainlinks hlist navbar nomobile" style="{{{style|}}}"> |<!--else: --><div class="noprint plainlinks hlist navbar nomobile" style="{{{style|}}}"><!-- -->}}<!-- -->{{#if:{{{brackets|}}}|&#91;}}{{#ifeq:{{{mini|}}}{{{miniv|}}}{{{plain|}}}{{{viewplain|}}}|<!--equals:-->1 |<!--then:(nothing)--> |<!--else: -->本模板:&nbsp;<!-- -->}}<!-- -->{{#if:{{{mini|}}} |<!--then: -->Template…” wikitext text/x-wiki <includeonly><!-- -->{{#if:{{{nodiv|}}} |<!--then: -->&nbsp;<span class="noprint plainlinks hlist navbar nomobile" style="{{{style|}}}"> |<!--else: --><div class="noprint plainlinks hlist navbar nomobile" style="{{{style|}}}"><!-- -->}}<!-- -->{{#if:{{{brackets|}}}|&#91;}}{{#ifeq:{{{mini|}}}{{{miniv|}}}{{{plain|}}}{{{viewplain|}}}|<!--equals:-->1 |<!--then:(nothing)--> |<!--else: -->本模板:&nbsp;<!-- -->}}<!-- -->{{#if:{{{mini|}}} |<!--then: -->[[Template:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板">查</span>]]{{·}}[[Template talk:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="关于这个模板的讨论页面">论</span>]]{{·}}[{{fullurl:Template:{{{1}}}|action=edit}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="您可以编辑这个模板。请在储存变更之前先预览">编</span>]{{#if:{{{history|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=history}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看zh-hant:檢視}-这个模板的编辑历史">历</span>]|}}{{#if:{{{purge|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=purge}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="清除这个模板的缓存">清</span>]|}}<!-- -->}}<!-- -->{{#ifeq:{{{miniv|}}}{{{viewplain|}}} |<!--equals:-->1 |<!--then: -->[[Template:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板">v{{#if:{{{viewplain|}}}|iew}}</span>]]<!-- -->|<!--else:(nothing)--> |}}<!-- -->{{#ifeq:{{{mini|}}}{{{miniv|}}}{{{viewplain|}}} |<!--equals:-->1 |<!--then:(nothing)--> |<!--else: -->[[Template:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板>-{zh-hans:查看;zh-hant:檢視}-</span>]]{{·}}[[Template talk:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="关于这个模板的讨论页面">讨论</span>]]{{·}}[{{fullurl:Template:{{{1}}}|action=edit}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="您可以编辑这个模板,请在储存变更之前先预览。">编辑</span>]{{#if:{{{history|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=history}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板的编辑历史">历史</span>]|}}{{#if:{{{purge|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=purge}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="清除这个模板的缓存">清除缓存</span>]|}}<!-- -->}}<!-- -->{{#if:{{{brackets|}}}|]}}<!-- -->{{#if:{{{nodiv|}}} |<!--then: --></span>&nbsp; |<!--else: --></div><!-- -->}}</includeonly><noinclude> {{模板文件}} <!-- 請將模板的分類與跨語言連結增加在 [[Template:Navbar/doc]] 子頁面 --> </noinclude> db0399c9770ff5b726990512e51ac42a22253e81 Template:模板文件 10 82 121 2022-10-04T09:35:03Z Richard Robin 2 重定向页面至[[Template:Documentation]] wikitext text/x-wiki #重定向 [[模板:Documentation]] 5e73ddd7d89eb5e119ee6d8ee00364bdd795ad26 Template:Lj 10 83 122 2022-10-04T09:36:00Z Richard Robin 2 创建页面,内容为“<span lang="ja" xml:lang="ja">-{{{{1}}}}-</span><noinclude>{{Documentation}}</noinclude>” wikitext text/x-wiki <span lang="ja" xml:lang="ja">-{{{{1}}}}-</span><noinclude>{{Documentation}}</noinclude> afacdfcb7e2d5c415e279edf63d0f4627506ae0d Template:· 10 84 123 2022-10-04T09:36:30Z Richard Robin 2 创建页面,内容为“<span style="white-space:nowrap; font-weight:bold;">&nbsp;· </span><noinclude>[[分類:辅助模板]]” wikitext text/x-wiki <span style="white-space:nowrap; font-weight:bold;">&nbsp;· </span><noinclude>[[分類:辅助模板]] e259732c0cf05ed36d92677411bca4c44fa0f163 海底小纵队与大王乌贼 0 85 124 2022-10-04T09:59:44Z Richard Robin 2 创建页面,内容为“{{Simpleboxtop | title = | toptext = <big>海底小纵队与大王乌贼</big><br>The Octonauts and the Giant Squid | image = The_giant_squid_title_card.png | width = 300px | imgwidth = 300px | bgcolor = #91cad9 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月11日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=海底小纵队…” wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与大王乌贼</big><br>The Octonauts and the Giant Squid | image = The_giant_squid_title_card.png | width = 300px | imgwidth = 300px | bgcolor = #91cad9 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月11日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与小飞鱼|小飞鱼]](英文版)<br> [[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与大虎鲸|大虎鲸]](英文版)<br> [[海底小纵队与逃离海藻行动|逃离海藻行动]](中文版)}} |} '''海底小纵队与大王乌贼'''("The Octonauts and the Giant Squid")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第6集,中文版则为第1季第2集。 While exploring the ocean, [[Captain Barnacles]] and [[Kwazii Cat|Kwazii]] inside the [[Gup-A]] were grabbed by a mysterious creature. [[Inkling|Professor Inkling]] discovers that the creature that grabbed the Gup-A is his long-lost cousin, [[Irving]] the Giant Squid. Inkling explores in the Gup-A to help Irving. Irving tells Inkling that he was very hungry, and so the professor got him several baskets of fish biscuits. He eats a lot of fish biscuits, which shows that he likes them. ==Summary== ==='''Attack!'''=== Professor Inkling is with the Vegimals baking fish biscuits in the kitchen when suddenly he gets called to the HQ. He tells the Vegimals to take the biscuits out of the oven while he's gone. Once he gets to HQ, he witnesses Barnacles and Kwazii in the Gup that has been grasped by a strange creature. As they manage to escape, the creature squirts ink. They return to the Octopod. ==='''Inkling's Cousin'''=== As [[Tweak]] inspects the ink on the Gup, Inkling deduces that the marks were made by his cousin, Irving the giant squid. He has [[Dashi]] show them his family photos, until they reach the one with the giant squid, only to find that it's not a good picture. He explains that the octopus and squid are in the same family, that they both have arms with suckers that help them grasp objects and they squirt ink to get away or hide from predators. When Kwazii asks why Irving grabbed the Gup, Inkling suggests that he was probably asking for help. Inkling sounds the Octo-alert. ==='''Family Reunion'''=== Barnacles, Kwazii, [[Peso]], and Inkling climb into the Gup and Tunip gives them a bunch of baskets full of fish biscuits. When they depart, Barnacles, Kwazii, and Peso search nearby caves looking for the giant squid while Inkling stayed behind. While he did, Irving shows up near the Gup and Inkling feeds him a basket of fish biscuits. Irving recognizes his cousin and explains that he grabbed the Gup because he thought it was food. He has the other three give him the baskets. They all, including Irving, return to the Octopod and Dashi takes another photo of Inkling and Irving. ==Creature Report== *[[Irving]] the Giant Squid ==Trivia/Goofs== * This episode comes right after [[The Undersea Storm]] in the US version. [[Category:剧集]] [[Category:第一季]] 05fb6063afe1cecc84a4d924c61b8df828ea7a9b Category:第一季 14 86 125 2022-10-04T10:02:42Z Richard Robin 2 创建空白页面 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Orcas title card.jpg 6 87 126 2022-10-04T10:15:01Z Richard Robin 2 Orcas wikitext text/x-wiki == 摘要 == Orcas == 许可协议 == {{Copyright}} 7beebe0e254f12f77a7b314cca6660054645aaab 海底小纵队与大虎鲸 0 88 127 2022-10-04T10:19:22Z Richard Robin 2 创建页面,内容为“海底小纵队与大虎鲸 {{Simpleboxtop | title = | toptext = <big>海底小纵队与大虎鲸</big><br>The Octonauts and the Orcas | image = Orcas_title_card.jpg | width = 300px | imgwidth = 300px | bgcolor = #97cedd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月12日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=海底…” wikitext text/x-wiki 海底小纵队与大虎鲸 {{Simpleboxtop | title = | toptext = <big>海底小纵队与大虎鲸</big><br>The Octonauts and the Orcas | image = Orcas_title_card.jpg | width = 300px | imgwidth = 300px | bgcolor = #97cedd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月12日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与大王乌贼|大王乌贼]](英文版)<br> [[海底小纵队与桨足动物|桨足动物]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与逃离海藻行动|逃离海藻行动]](英文版)<br> [[海底小纵队与水滴鱼兄弟|水滴鱼兄弟]](中文版)}} |} '''海底小纵队与大虎鲸'''("The Octonauts and the Orcas")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第7集,中文版则为第1季第11集。 == Summary == [[Captain Barnacles]] was practicing his accordion and he attracts a pod of Orca whales to the [[Octopod]]. While [[Kwazii Cat|Kwazii]] is in the [[Gup-B]] racing with an Orca, both end up on an island inhabited by fiddler crabs. The Orca soon gets beached on the island's surface and the Octonauts have to try and help keep the Orca as wet as they can and get him back into the ocean. == Plot == === '''Annoying Sound''' === Barnacles is playing his accordion in his room Kwazii comes in telling captain if he could practice somewhere else. Just then, their ship gets hit by something and Barnacles tells Kwazii to sound the octo-alert. Barnacles, Kwazii, and the other Octonauts meet at the HQ when their ship gets hit again. They then see a whale called a orca and many more also arrive. === '''New friends''' === Barnacles and Kwazii look outside the window when a orca aggressively swims over and rams the octopod. Kwazii tells Barnacles that they have to bump him back but the captain says that they should talk before they bump. Barnacles tells the orcas to not bump their ship. Suddenly the male orca gets ready to ram the octopod again only to get stopped by the female orca which tells the other orcas to get back. The female orca apologizes and explains that they heard the octopod making strange noises. Barnacles tells them that it was him having trouble playing his accordion but the orcas thought it sounded quite lovely (which Kwazii disagrees). === '''Going outside to meet their new friends''' === The Octonauts exit the octopod and meet the orcas, Shellington records the orcas calls, Tweak measures how long the orcas are, Dashi takes lots of pictures of the orcas. The male orca that bumped the octopod asks Kwazii if he wants to race, when Kwazii decides to race him, the orca takes off without saying go. This forces Kwazii to go full speed on the Gup-B in order to keep up with the orca. Barnacles keeps an eye on Kwazii and the orca on the radar just in case something goes wrong. === '''Gup-B vs. Orca Whale''' === Meanwhile, Kwazii is still trying to keep up with the orca. However they're heading straight for a beach. Barnacles hops into the Gup-D in an attempt to stop them but its too late. Meanwhile, the orca wins the race by beaching himself on the beach and chanting to himself that he won. Kwazii arrives and says "he had a head start" but the Orca replies that he can have a head start next time but he'll still win. The orca then is unable to get back into the water (well whose fault is that?) and tells Kwazii to give him a push. Kwazii charges at the orca to try to push him only to bounce off the orcas head and land on the sand. Just then Barnacles arrives and asks Kwazii to keep the orca wet with a bucket in the Gup. === '''Rescuing the Orca: Part 1''' === Barnacles contacts the Octopod and the other Octonauts arrive on the beach, Tweak says they will need rope and lots of it. They tie the ropes onto the fins of the orca and Barnacles gives the command to pull but the Orca cries out in pain and says that it really hurts and Barnacles tells them to stop pulling. Barnacles asks the Fiddler Crabs if they can get the ropes under the Orca but the Crabs refuse to help; saying that its his fault getting himself stuck on the beach. A wave then comes and the leader of the Fiddler Crabs gets flipped upside down, Barnacles helps him up and the Crabs agree to help. === '''Rescuing the Orca: Part 2''' === The Crabs move the ropes under the orca so that way it wraps around him and doesn't pull too hard on the orcas fins. Once they're done wrapping the ropes around the Orca, Barnacles gives the command to pull again which works and the Orca is freed from being stranded on the beach. Back at the octopod, the Orcas thank the Octonauts and tells Barnacles to practice their special signal much to Kwazii's dismay, the Orcas say goodbye and leaves. ==Creature Report== * [[Orcas]] ==Trivia/Goofs== *In the UK version of the episode, [[Tweak]] says "There's another! And another!". In the US version, the "And another!" bit is said by [[Dashi]] instead. *Many people believe Orcas are whales, while most sources say that they are actually the largest dolphins in the ocean. Whales and dolphins are distant relatives, so it may make sense of what people believe. *This is the first episode to show a species of whale, or cetacean. *The Octonauts react to the Orcas bumping the Octopod before it even happens. *When the Vegimals were carrying the Water bucket. Another Codish and Tominnow could be seen. It’s likely these were before [[Pikato]] and [[Halibeet]] were added, however [[Sharchini]] is nowhere to be seen. Likely boosting this theory’s possibility. As there would’ve been another Grouber shown. Plus, they continued passing the bucket, despite there not being another one. *The Vegimals were also singing the exact same tune they sang when they were hatching, and riding the Gup-V in [[A Very Vegimal Christmas]] [[Category:剧集]] [[Category:第一季]] 22702cae6a6ca19ce642e4accaf10235248646fd 128 127 2022-10-04T10:19:40Z Richard Robin 2 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底小纵队与大虎鲸</big><br>The Octonauts and the Orcas | image = Orcas_title_card.jpg | width = 300px | imgwidth = 300px | bgcolor = #97cedd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月12日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与大王乌贼|大王乌贼]](英文版)<br> [[海底小纵队与桨足动物|桨足动物]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与逃离海藻行动|逃离海藻行动]](英文版)<br> [[海底小纵队与水滴鱼兄弟|水滴鱼兄弟]](中文版)}} |} '''海底小纵队与大虎鲸'''("The Octonauts and the Orcas")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第7集,中文版则为第1季第11集。 == Summary == [[Captain Barnacles]] was practicing his accordion and he attracts a pod of Orca whales to the [[Octopod]]. While [[Kwazii Cat|Kwazii]] is in the [[Gup-B]] racing with an Orca, both end up on an island inhabited by fiddler crabs. The Orca soon gets beached on the island's surface and the Octonauts have to try and help keep the Orca as wet as they can and get him back into the ocean. == Plot == === '''Annoying Sound''' === Barnacles is playing his accordion in his room Kwazii comes in telling captain if he could practice somewhere else. Just then, their ship gets hit by something and Barnacles tells Kwazii to sound the octo-alert. Barnacles, Kwazii, and the other Octonauts meet at the HQ when their ship gets hit again. They then see a whale called a orca and many more also arrive. === '''New friends''' === Barnacles and Kwazii look outside the window when a orca aggressively swims over and rams the octopod. Kwazii tells Barnacles that they have to bump him back but the captain says that they should talk before they bump. Barnacles tells the orcas to not bump their ship. Suddenly the male orca gets ready to ram the octopod again only to get stopped by the female orca which tells the other orcas to get back. The female orca apologizes and explains that they heard the octopod making strange noises. Barnacles tells them that it was him having trouble playing his accordion but the orcas thought it sounded quite lovely (which Kwazii disagrees). === '''Going outside to meet their new friends''' === The Octonauts exit the octopod and meet the orcas, Shellington records the orcas calls, Tweak measures how long the orcas are, Dashi takes lots of pictures of the orcas. The male orca that bumped the octopod asks Kwazii if he wants to race, when Kwazii decides to race him, the orca takes off without saying go. This forces Kwazii to go full speed on the Gup-B in order to keep up with the orca. Barnacles keeps an eye on Kwazii and the orca on the radar just in case something goes wrong. === '''Gup-B vs. Orca Whale''' === Meanwhile, Kwazii is still trying to keep up with the orca. However they're heading straight for a beach. Barnacles hops into the Gup-D in an attempt to stop them but its too late. Meanwhile, the orca wins the race by beaching himself on the beach and chanting to himself that he won. Kwazii arrives and says "he had a head start" but the Orca replies that he can have a head start next time but he'll still win. The orca then is unable to get back into the water (well whose fault is that?) and tells Kwazii to give him a push. Kwazii charges at the orca to try to push him only to bounce off the orcas head and land on the sand. Just then Barnacles arrives and asks Kwazii to keep the orca wet with a bucket in the Gup. === '''Rescuing the Orca: Part 1''' === Barnacles contacts the Octopod and the other Octonauts arrive on the beach, Tweak says they will need rope and lots of it. They tie the ropes onto the fins of the orca and Barnacles gives the command to pull but the Orca cries out in pain and says that it really hurts and Barnacles tells them to stop pulling. Barnacles asks the Fiddler Crabs if they can get the ropes under the Orca but the Crabs refuse to help; saying that its his fault getting himself stuck on the beach. A wave then comes and the leader of the Fiddler Crabs gets flipped upside down, Barnacles helps him up and the Crabs agree to help. === '''Rescuing the Orca: Part 2''' === The Crabs move the ropes under the orca so that way it wraps around him and doesn't pull too hard on the orcas fins. Once they're done wrapping the ropes around the Orca, Barnacles gives the command to pull again which works and the Orca is freed from being stranded on the beach. Back at the octopod, the Orcas thank the Octonauts and tells Barnacles to practice their special signal much to Kwazii's dismay, the Orcas say goodbye and leaves. ==Creature Report== * [[Orcas]] ==Trivia/Goofs== *In the UK version of the episode, [[Tweak]] says "There's another! And another!". In the US version, the "And another!" bit is said by [[Dashi]] instead. *Many people believe Orcas are whales, while most sources say that they are actually the largest dolphins in the ocean. Whales and dolphins are distant relatives, so it may make sense of what people believe. *This is the first episode to show a species of whale, or cetacean. *The Octonauts react to the Orcas bumping the Octopod before it even happens. *When the Vegimals were carrying the Water bucket. Another Codish and Tominnow could be seen. It’s likely these were before [[Pikato]] and [[Halibeet]] were added, however [[Sharchini]] is nowhere to be seen. Likely boosting this theory’s possibility. As there would’ve been another Grouber shown. Plus, they continued passing the bucket, despite there not being another one. *The Vegimals were also singing the exact same tune they sang when they were hatching, and riding the Gup-V in [[A Very Vegimal Christmas]] [[Category:剧集]] [[Category:第一季]] 285d06cee3875ee53fa40121ee0397478caddc90 海底小纵队维基:版权 4 7 130 17 2022-10-04T10:26:46Z Richard Robin 2 wikitext text/x-wiki 海底小纵队维基的原创内容默认基于[https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 <big>您可以自由地:</big> *'''共享''' — 在任何媒介以任何形式复制、发行本作品。 *'''演绎''' — 修改、转换或以本作品为基础进行创作,在任何用途下,甚至商业目的。 只要你遵守许可协议条款,许可人就无法收回你的这些权利。 <big>惟须遵守下列条件:</big> *'''署名''' — 您必须给出适当的署名,提供指向本许可协议的链接,同时标明是否(对原始作品)作了修改。您可以用任何合理的方式来署名,但是不得以任何方式暗示许可人为您或您的使用背书。 *'''相同方式共享''' — 如果您再混合、转换或者基于本作品进行创作,您必须基于'''与原先许可协议相同的许可协议'''分发您贡献的作品。 *'''没有附加限制''' — 您不得适用法律术语或者技术措施从而限制其他人做许可协议允许的事情。 <big>声明:</big> *您不必因为公共领域的作品要素而遵守许可协议,或者您的使用被可适用的例外或限制所允许。 *不提供担保。许可协议可能不会给与您意图使用的所必须的所有许可。例如,其他权利比如形象权、隐私权或人格权可能限制您如何使用作品。 == 免责声明 == '''OCTONAUTS™ OCTOPOD™ Meomi Design Inc. OCTONAUTS Copyright © 2021 Vampire Squid Productions Limited. All rights reserved.''' '''Copyright © 2021 Silvergate Media Holdings Limited, registered in England and Wales under company number 08880268,. Registered VAT number 115149928. All rights reserved.''' 海底小纵队(Octonauts)相关的商标权和其它知识产权归原作者 Vicky Wong 和 Michael Murphy、英国Silvergate(银色大门)公司、加拿大Meomi工作室、中国万达宝贝王集团等企划单位或个人所有。海底小纵队维基与上述单位没有任何关联,相关权利不属于以上许可协议授权范围。 海底小纵队维基对《海底小纵队》内容的使用基于著作权法的合理使用原则,绝无侵犯著作权之故意。 [[Category:海底小纵队维基规范]] b52d5e01bf0d6b7069de1fea357b92acaeaf4773 Module:Format link 828 875 1727 2022-10-04T13:37:11Z Pppery 34 Avoid Lua erroring when we run out of expensive parser function calls Scribunto text/plain -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end local function maybeItalicize(s, shouldItalicize) -- Italicize s if s is a string and the shouldItalicize parameter is true. if s and shouldItalicize then return '<i>' .. s .. '</i>' else return s end end local function parseLink(link) -- Parse a link and return a table with the link's components. -- These components are: -- - link: the link, stripped of any initial colon (always present) -- - page: the page name (always present) -- - section: the page name (may be nil) -- - display: the display text, if manually entered after a pipe (may be nil) link = removeInitialColon(link) -- Find whether a faux display value has been added with the {{!}} magic -- word. local prePipe, display = link:match('^(.-)|(.*)$') link = prePipe or link -- Find the page, if it exists. -- For links like [[#Bar]], the page will be nil. local preHash, postHash = link:match('^(.-)#(.*)$') local page if not preHash then -- We have a link like [[Foo]]. page = link elseif preHash ~= '' then -- We have a link like [[Foo#Bar]]. page = preHash end -- Find the section, if it exists. local section if postHash and postHash ~= '' then section = postHash end return { link = link, page = page, section = section, display = display, } end local function formatDisplay(parsed, options) -- Formats a display string based on a parsed link table (matching the -- output of parseLink) and an options table (matching the input options for -- _formatLink). local page = maybeItalicize(parsed.page, options.italicizePage) local section = maybeItalicize(parsed.section, options.italicizeSection) if (not section) then return page elseif (not page) then return mw.ustring.format('§&nbsp;%s', section) else return mw.ustring.format('%s §&nbsp;%s', page, section) end end local function missingArgError(target) mError = require('Module:Error') return mError.error{message = 'Error: no link or target specified! ([[' .. target .. '#Errors|help]])' } end -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.formatLink(frame) -- The formatLink export function, for use in templates. yesno = require('Module:Yesno') local args = getArgs(frame) local link = args[1] or args.link local target = args[3] or args.target if not (link or target) then return missingArgError('Template:Format link') end return p._formatLink{ link = link, display = args[2] or args.display, target = target, italicizePage = yesno(args.italicizepage), italicizeSection = yesno(args.italicizesection), categorizeMissing = args.categorizemissing } end function p._formatLink(options) -- The formatLink export function, for use in modules. checkType('_formatLink', 1, options, 'table') local function check(key, expectedType) --for brevity checkTypeForNamedArg( '_formatLink', key, options[key], expectedType or 'string', true ) end check('link') check('display') check('target') check('italicizePage', 'boolean') check('italicizeSection', 'boolean') check('categorizeMissing') -- Normalize link and target and check that at least one is present if options.link == '' then options.link = nil end if options.target == '' then options.target = nil end if not (options.link or options.target) then return missingArgError('Module:Format link') end local parsed = parseLink(options.link) local display = options.display or parsed.display local catMissing = options.categorizeMissing local category = '' -- Find the display text if not display then display = formatDisplay(parsed, options) end -- Handle the target option if present if options.target then local parsedTarget = parseLink(options.target) parsed.link = parsedTarget.link parsed.page = parsedTarget.page end -- Test if page exists if a diagnostic category is specified if catMissing and (mw.ustring.len(catMissing) > 0) then local title = nil if parsed.page then title = mw.title.new(parsed.page) end if title and (not title.isExternal) then local success, exists = pcall(function() return title.exists end) if success and not exists then category = mw.ustring.format('[[Category:%s]]', catMissing) end end end -- Format the result as a link if parsed.link == display then return mw.ustring.format('[[:%s]]%s', parsed.link, category) else return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category) end end -------------------------------------------------------------------------------- -- Derived convenience functions -------------------------------------------------------------------------------- function p.formatPages(options, pages) -- Formats an array of pages using formatLink and the given options table, -- and returns it as an array. Nil values are not allowed. local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink{ link = page, categorizeMissing = options.categorizeMissing, italicizePage = options.italicizePage, italicizeSection = options.italicizeSection } end return ret end return p 1253bdd2683ee4badc33856bfd5499b09a7dca1f 首页 0 2 141 101 2022-10-04T16:25:54Z Richard Robin 2 wikitext text/x-wiki <center><big><big><big>欢迎来到海底小纵队中文维基</big></big></big></center> <center>Welcome to the Octonauts Chinese Wiki!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 == 索引 == *[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] *[https://octonauts.miraheze.org/wiki/Category:剧集 海底小纵队剧集] == 工程 == *[[海底小纵队维基:角色工程|角色工程]] *[[海底小纵队维基:生物工程|生物工程]] *[[海底小纵队维基:动画工程|动画工程]] *[[海底小纵队维基:图书工程|图书工程]] == 更多内容您可以访问: == *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] == 友情链接 == (敬请期待) b57d7b79734166b809671db929987afe7e43ae73 148 141 2022-10-04T17:08:23Z Richard Robin 2 方便编辑 wikitext text/x-wiki <center><big><big><big>欢迎来到海底小纵队中文维基</big></big></big></center> <center>Welcome to the Octonauts Chinese Wiki!</center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] 这里是海底小纵队中文维基。该维基意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。 该网站刚成立不久,我们欢迎各位朋友协助我们一起编写。 目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。 == 索引 == {{首页/索引}} == 工程 == {{首页/工程}} == 相关链接 == {{首页/相关链接}} == 友情链接 == {{首页/友情链接}} aeddbc935f4fc330bd03e7d3090ad3e1b56c8e4b 150 148 2022-10-04T17:39:47Z wikitext 151 150 2022-10-04T17:45:06Z wikitext 海底小纵队(动画剧集) 0 14 142 55 2022-10-04T16:58:05Z Richard Robin 2 信息栏 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>《海底小纵队》</big><br>''Octonauts'' | image = OctonautsTV.jpg | width = 300px | imgwidth = 300px | bgcolor = #a6dff7 | subtitle = 《海底小纵队》动画海报 }} {{Simpleboxdata|label=导演|data=达拉赫·奥康纳<br>尼基·费兰<br>瓦西里耶维奇·米科尔斯基}} {{Simpleboxdata|label=制片|data=黄向锐(中文版)}} {{Simpleboxdata|label=编剧|data=Silvergate Media}} {{Simpleboxdata|label=发行方|data=Silvergate Media}} {{Simpleboxdata|label=上映日期|data=2010年10月4日至今(英文版)<br /> 2014年5月13日至今(中文版)}} {{Simpleboxdata|label=电视平台|data=CBeebies(英国BBC少儿频道)首播<br> Disney Junior(美国)<br> ABC(澳大利亚)<br> CCTV-14(中国)<br> TF1(法国)<br> Super RTL(德国)}} {{Simpleboxdata|label=产地|data=英国、爱尔兰}} {{Simpleboxdata|label=语言|data=英语、日语、韩语、法语、俄语、<br/>汉语普通话(国语)等}} |} '''《海底小纵队》'''(''Octonauts''),是英国银色之门影视公司(Silvegate Media)于2010年开播(中国大陆2014年开播)的儿童动画片,该作品改编自加拿大设计工作室Meomi的同名系列绘本。<br /> 该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及团队协作等内容。动画讲述了八个可爱的拟人化小动物组成的海底探险小队的故事。以巴克队长为领导核心,小队集结了医生、生物学家、摄影师、机械工程师等7名伙伴。他们是一群活跃在海底的冒险家,有着各自的爱好与独特的特长,在队长的带领下向着未知的海域不断探索前进。<br /> 目前海底小纵队在中国大陆的版权持有方是万达集团下属的万达宝贝王。 《海底小纵队》在世界已播出第一季50集、第二季22集、第三季20集、第四季26集、第五季27集、第六季26集、第七季26集。 [[分类:海底小纵队]][[分类:动画]] 37bf283b7d4a0bc50d77694490f7d39f9a1b4b0f 143 142 2022-10-04T17:02:41Z Richard Robin 2 添加介绍 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>《海底小纵队》</big><br>''Octonauts'' | image = OctonautsTV.jpg | width = 300px | imgwidth = 300px | bgcolor = #a6dff7 | subtitle = 《海底小纵队》动画海报 }} {{Simpleboxdata|label=导演|data=达拉赫·奥康纳<br>尼基·费兰<br>瓦西里耶维奇·米科尔斯基}} {{Simpleboxdata|label=制片|data=黄向锐(中文版)}} {{Simpleboxdata|label=编剧|data=Silvergate Media}} {{Simpleboxdata|label=发行方|data=Silvergate Media}} {{Simpleboxdata|label=上映日期|data=2010年10月4日至今(英文版)<br /> 2014年5月13日至今(中文版)}} {{Simpleboxdata|label=电视平台|data=CBeebies(英国BBC少儿频道)首播<br> Disney Junior(美国)<br> ABC(澳大利亚)<br> CCTV-14(中国)<br> TF1(法国)<br> Super RTL(德国)}} {{Simpleboxdata|label=产地|data=英国、爱尔兰}} {{Simpleboxdata|label=语言|data=英语、日语、韩语、法语、俄语、<br/>汉语普通话(国语)等}} |} '''《海底小纵队》'''(''Octonauts''),是英国银色之门影视公司(Silvegate Media)于2010年开播(中国大陆2014年开播)的儿童动画片,该作品改编自加拿大设计工作室Meomi的同名系列绘本。<br /> 该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及团队协作等内容。动画讲述了八个可爱的拟人化小动物组成的海底探险小队的故事。以巴克队长为领导核心,小队集结了医生、生物学家、摄影师、机械工程师等7名伙伴。他们是一群活跃在海底的冒险家,有着各自的爱好与独特的特长,在队长的带领下向着未知的海域不断探索前进。<br /> 目前海底小纵队在中国大陆的版权持有方是万达集团下属的万达宝贝王。 《海底小纵队》在世界已播出第一季50集、第二季22集、第三季20集、第四季26集、第五季27集、第六季26集、第七季26集。 == 介绍 == 《海底小纵队》是英国silvergate公司(银色大门)与俄罗斯开心球友好签约的旗下作品。该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及学龄前团队协作等内容。动画讲述了八个可爱小动物组成的海底探险小队的故事。他们居住在神秘基地——章鱼堡,随时准备出发去解决海底遇险、排除海底可能发生的危险。 <del>然后每集任务结束后就会来个名叫《海底报告》的尬舞+唱歌,可以听到巴克队长美妙的歌喉。</del>每集的海底报告歌词都不太一样。 每集动画都建立在一次探险的基础之上,小队成员发挥自己的特殊本领,克服险境,探索海洋奥妙,发现未知生物。 [[分类:海底小纵队]][[分类:动画]] 36b62301b0a006dca29628eb2f77caf3cf70eaac Template:首页/友情链接 10 98 144 2022-10-04T17:04:32Z Richard Robin 2 创建页面,内容为“(敬请期待)” wikitext text/x-wiki (敬请期待) 6172390862e581dab1783891265795143cb28b21 Template:首页/相关链接 10 99 145 2022-10-04T17:04:35Z Richard Robin 2 创建页面,内容为“更多内容您可以访问: *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话] *[https://tieba.b…” wikitext text/x-wiki 更多内容您可以访问: *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] 4b27ed214a22594ae2290191eaf2011dedbbaccf Template:首页/工程 10 100 146 2022-10-04T17:04:37Z Richard Robin 2 创建页面,内容为“*[[海底小纵队维基:角色工程|角色工程]] *[[海底小纵队维基:生物工程|生物工程]] *[[海底小纵队维基:动画工程|动画工程]] *[[海底小纵队维基:图书工程|图书工程]]” wikitext text/x-wiki *[[海底小纵队维基:角色工程|角色工程]] *[[海底小纵队维基:生物工程|生物工程]] *[[海底小纵队维基:动画工程|动画工程]] *[[海底小纵队维基:图书工程|图书工程]] 656ee7938a206ced1d647ed88b7eaaf7271820ea Template:首页/索引 10 101 147 2022-10-04T17:04:40Z Richard Robin 2 创建页面,内容为“*[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] *[https://octonauts.miraheze.org/wiki/Category:剧集 海底小纵队剧集]” wikitext text/x-wiki *[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] *[https://octonauts.miraheze.org/wiki/Category:剧集 海底小纵队剧集] b3109ec844a26585689fb4b1058a8a6301e41a59 File:吃下海星粉这枚安利,小纵队陪你欢度国庆.jpg 6 102 149 2022-10-04T17:25:25Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b Template:首页/最新动态 10 103 152 2022-10-05T08:37:29Z Richard Robin 2 创建页面,内容为“[[File:吃下海星粉这枚安利,小纵队陪你欢度国庆.jpg|center|530px|link=https://weibo.com/5184055512/M87dZnnaA?pagetype=profilefeed]]” wikitext text/x-wiki [[File:吃下海星粉这枚安利,小纵队陪你欢度国庆.jpg|center|530px|link=https://weibo.com/5184055512/M87dZnnaA?pagetype=profilefeed]] 4c6b2eff63a16dbc0d1111ce65ad850e44a22d19 首页 0 2 153 151 2022-10-05T08:37:47Z wikitext 162 153 2022-11-12T12:56:12Z Richard Robin 2 wikitext text/x-wiki <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div><br> {| summary= style="width:100%;table-layout: fixed;" cellpadding="4px" | |- valign=top style="table-layout:fixed" | <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="clear:both"></div> | valign="top" width="370px"|<div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> {{首页/工程}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> {{首页/相关链接}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> |} a2311172a5fe09e0b64eea557d4cd7ff01e96575 Template:首页/最新动态 10 103 154 152 2022-10-05T08:39:49Z Richard Robin 2 已保护“[[Template:首页/最新动态]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki [[File:吃下海星粉这枚安利,小纵队陪你欢度国庆.jpg|center|530px|link=https://weibo.com/5184055512/M87dZnnaA?pagetype=profilefeed]] 4c6b2eff63a16dbc0d1111ce65ad850e44a22d19 Template:首页/索引 10 101 155 147 2022-10-05T08:40:11Z Richard Robin 2 已保护“[[Template:首页/索引]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki *[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] *[https://octonauts.miraheze.org/wiki/Category:剧集 海底小纵队剧集] b3109ec844a26585689fb4b1058a8a6301e41a59 Template:首页/工程 10 100 156 146 2022-10-05T08:40:28Z Richard Robin 2 已保护“[[Template:首页/工程]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki *[[海底小纵队维基:角色工程|角色工程]] *[[海底小纵队维基:生物工程|生物工程]] *[[海底小纵队维基:动画工程|动画工程]] *[[海底小纵队维基:图书工程|图书工程]] 656ee7938a206ced1d647ed88b7eaaf7271820ea Template:首页/相关链接 10 99 157 145 2022-10-05T08:40:47Z Richard Robin 2 已保护“[[Template:首页/相关链接]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki 更多内容您可以访问: *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] 4b27ed214a22594ae2290191eaf2011dedbbaccf Template:首页/友情链接 10 98 158 144 2022-10-05T08:40:54Z Richard Robin 2 已保护“[[Template:首页/友情链接]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki (敬请期待) 6172390862e581dab1783891265795143cb28b21 Template:MessageBox 10 930 1851 2022-10-05T21:20:15Z Pppery 34 Categorize wikitext text/x-wiki <div style="width: {{#if:{{{width|}}}|{{{width}}}|80%}}; background-color: {{#if:{{{Background color}}}|{{{Background color}}}|#f5f5f5}}; border-top: 1px solid {{#if:{{{Border color}}}|{{{Border color}}}|#aaaaaa}}; border-bottom: 1px solid {{#if:{{{Border color}}}|{{{Border color}}}|#aaaaaa}}; border-right: 1px solid {{#if:{{{Border color}}}|{{{Border color}}}|#aaaaaa}}; border-left: 12px solid {{#if:{{{Flag color}}}|{{{Flag color}}}|#aaaaaa}}; margin: 0.5em auto 0.5em;"> {| {{#if:{{{Image}}}|{{!}}style="width:93px; text-align:center; vertical-align:middle; padding-top:1px;padding-bottom:7px" {{!}} {{{Image}}} }} |style="vertical-align:middle;padding-left:3px;padding-top:10px;padding-bottom:10px;padding-right:10px; background-color: {{#if:{{{Background color}}}{{!}}{{{Background color}}}{{!}}#f5f5f5}};" | {{{Message text}}} |} </div><noinclude>[[Category:Notice templates]]</noinclude> c6727bf6179a36a5413ed93f232fd0e2f7180256 Module:Protection banner 828 886 1749 2022-10-21T08:07:11Z wikipedia>WOSlinker 0 use require('strict') instead of require('Module:No globals') Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Module:Message box 828 845 1651 2022-10-21T19:39:49Z Pppery 34 These can just go, the first for being very Wikipedia-specific, and the second for being almost impossible to import properly Scribunto text/plain -- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary modules. require('Module:No globals') local getArgs local yesno = require('Module:Yesno') local templatestyles = 'Module:Message box/styles.css' -- Get a language object for formatDate and ucfirst. local lang = mw.language.getContentLanguage() -- Define constants local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {user = 'tmbox', talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date) end self.info = args.info end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell if cfg.imageEmptyCellStyle then self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px' end -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):css('width', '52px') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') :cssText(self.imageEmptyCellStyle or nil) end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) and not self.isSmall then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):css('width', '52px') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :css('text-align', 'center') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end local function templatestyles(frame, src) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = templatestyles} } .. 'CONFIG_MODULE' end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) be00cd389f9f2afcd361e5d5e33622839555cbd9 1679 1651 2022-10-23T04:26:44Z Legoktm 38 Replace [[Module:No globals]] with require( "strict" ) Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) bdb0ecc9f26f26b9c0ce12a066a183ac9d4f0705 Template:Para 10 850 1661 2022-10-21T19:52:33Z Pppery 34 wikitext text/x-wiki <code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 7be5bee75307eae9342bbb9ff3a613e93e93d5a7 Template:Mbox/doc 10 849 1659 2022-10-21T19:54:53Z Pppery 34 Localize- pass 2 wikitext text/x-wiki {{Documentation subpage}} <!-- Please add categories to the /doc subpage, and interwikis at Wikidata (see Wikipedia:Wikidata) --> {{tl|mbox}} stands '''m'''essage '''box''', which is a metatemplate used to build message boxes for other templates. It offers several different colours, images and some other features. ==Basic usage== The box below shows the most common parameters that are accepted by {{Tl|mbox}}. The purpose of each is described below. <pre style="overflow:auto;"> {{mbox | name = | small = {{{small|}}} | type = | image = | sect = {{{1|}}} | issue = | talk = {{{talk|}}} | fix = | date = {{{date|}}} | cat = | all = }} </pre> ==Full usage== The "All parameters" box shows all possible parameters for this template. However, it is not recommended to copy this, because it will never be required to use all parameters simultaneously. {| class="wikitable" align="left" style="background:transparent; width=30%;" !All parameters |- |<pre style="font-size:100%"> {{mbox | name = | small = {{{small|}}} | type = | image = | imageright = | smallimage = | smallimageright = | class = | style = | textstyle = | sect = {{{1|}}} | issue = | talk = {{{talk|}}} | fix = | date = {{{date|}}} | text = | smalltext = | plainlinks = no | removalnotice = | cat = | all = | cat2 = | all2 = | cat3 = | all3 = }} </pre> |} {{clear}} ==Common parameters== === ''name'' === The ''name'' parameter specifies the name of the template, without the Template namespace prefix. For example [[w:Template:Underlinked]] specifies {{Para|name|Underlinked}}. This parameter should be updated if the template is ever moved. The purpose of this parameter is to allow the template to have a more useful display on its template page, for example to show the date even when not specified, and to apply categorisation of the template itself. === ''small'' === The ''small'' parameter should be passed through the template, as this will allow editors to use the small format by specifying {{para|small|left}} on an article: {{mbox|nocat=true|small=left|text=This is the small left-aligned mbox format.}} Otherwise the standard format will be produced: {{mbox|nocat=true|text=This is the standard mbox format.}} Other variations: * For templates which should ''never'' be small, specify {{Para|small|no}} or do not pass the small parameter at all. * For templates which should ''always'' be small, just specify {{Para|small|left}}. * For templates which should ''default to small'', try {{para|small|<nowiki>{{{small|left}}}</nowiki>}}. This will allow an editor to override by using {{para|small|no}} on an article. To use a small box that adjusts its width to match the text, use {{para|style|width: auto; margin-right: 0px;}} and {{para|textstyle|width: auto;}} together: {{mbox|nocat=true|small=left|style=width: auto; margin-right: 0px;|textstyle=width: auto; margin-right: 0px;|text=This is the small left-aligned Ambox format with flexible width.}} See [[#Sect]] below for more information on how to limit {{para|small}} display to cases when the template is being used for a section instead of the whole article (recommended, to prevent inconsistent top-of-article display). === ''type'' === The ''type'' parameter defines the colour of the left bar, and the image that is used by default. The type is chosen not on aesthetics but is based on the type of issue that the template describes. The seven available types and their default images are shown below. {{mbox |nocat=true | type = speedy | text = type=<u>speedy</u> – Speedy deletion issues }} {{mbox |nocat=true | type = delete | text = type=<u>delete</u> – Deletion issues, }} {{mbox |nocat=true | type = content | text = type=<u>content</u> – Content issues }} {{mbox |nocat=true | type = style | text = type=<u>style</u> – Style issues }} {{mbox |nocat=true | type = notice | text = type=<u>notice</u> – Article notices {{mbox |nocat=true | type = move | text = type=<u>move</u> – Merge, split and transwiki proposals }} {{mbox |nocat=true | type = protection | text = type=<u>protection</u> – Protection notices, }} If no ''type'' parameter is given the template defaults to {{para|type|notice}}. === ''image'' === You can choose a specific image to use for the template by using the ''image'' parameter. Images are specified using the standard syntax for inserting files. Widths of 40-50px are typical. Please note: * If no image is specified then the default image corresponding to the ''type'' is used. (See [[#type]] above.) * If {{para|image|none}} is specified, then no image is used and the text uses the whole message box area. === ''sect'' === Many message templates begin with the text '''This article ...''' and it is often desirable that this wording change to '''This section ...''' if the template is used on a section instead. The value of this parameter will replace the word "article". Various possibilities for use include: {{para|sect|list}}, {{para|sect|table}}, {{para|sect|"In popular culture" material}}, etc. If using this feature, be sure to remove the first two words ("This article") from the template's text, otherwise it will be duplicated. A common way to facilitate this functionality is to pass {{para|sect|<nowiki>{{{1|}}}</nowiki>}}. This will allow editors to type <kbd>section</kbd>, for example, as the first unnamed parameter of the template to change the wording. Another approach is to pass {{para|sect|<nowiki>{{{section|{{{sect|}}}}}}</nowiki>}} to provide a named value. === ''issue'' and ''fix'' === The ''issue'' parameter is used to describe the issue with the page. Try to keep it short and to-the-point (approximately 10-20 words). The ''fix'' parameter contains some text which describes what should be done to improve the page. It may be longer than the text in ''issue'', but should not usually be more than two sentences. When the template is in its small form (when using {{para|small|left}}), the ''issue'' is the only text that will be displayed. For example [[w:Template:Citation style]] defines When used stand-alone it produces the whole text: But when used with |small=left it displays only the issue: === ''talk'' === Some message templates include a link to the talk page, and allow an editor to specify a section heading to link directly to the relevant section. To achieve this functionality, simply pass the ''talk'' parameter through, i.e. talk=<nowiki>{{{talk|}}}</nowiki> This parameter may then be used by an editor as follows: * talk=SECTION HEADING – the link will point to the specified section on the article's talk page, e.g. talk=Foo. * talk=FULL PAGE NAME – the template will link to the page specified (which may include a section anchor), e.g. talk=Talk:Banana#Foo Notes: * When this parameter is used by a template, the talk page link will appear on the template itself (in order to demonstrate the functionality) but this will only display on articles if the parameter is actually defined. * In order to make sure there is always a link to the talk page, you can use |talk=<nowiki>{{{talk|#}}}</nowiki>. * If the talk page does not exist, there will be no link, whatever the value of the parameter. === ''date'' === Passing the ''date'' parameter through to the meta-template means that the date that the article is tagged may be specified by an editor (or more commonly a bot). This will be displayed after the message in a smaller font. Passing this parameter also enables monthly cleanup categorisation when the ''cat'' parameter is also defined. === ''info'' === This parameter is for specifying additional information. Whatever you add here will appear after the date. === ''cat'' === This parameter defines a monthly cleanup category. If |cat=CATEGORY then: * articles will be placed in '''Category:CATEGORY from DATE''' if |date=DATE is specified. * articles will be placed in '''Category:CATEGORY''' if the date is not specified. For example, [[w:Template:No footnotes]] specifies |cat=Articles lacking in-text citations and so an article with the template {{Tlx|No footnotes|2=date=June 2010|SISTER=w:}} will be placed in [[w:Category:Articles lacking in-text citations from June 2010]]. The ''cat'' parameter should not be linked, nor should the prefix <code>Category:</code> be used. === ''all'' === The ''all'' parameter defines a category into which all articles should be placed. The ''all'' parameter should not be linked, nor should the prefix <code>Category:</code> be used. == Additional parameters == === ''imageright'' === An image on the right side of the message box may be specified using this parameter. The syntax is the same as for the ''image'' parameter, except that the default is no image. === ''smallimage'' and ''smallimageright'' === Images for the small format box may be specified using these parameters. They will have no effect unless {{para|small|left}} is specified. === ''class'' === Custom [[w:Cascading Style Sheets|CSS]] classes to apply to the box. If adding multiple classes, they should be space-separated. === ''style'' and ''textstyle'' === Optional CSS values may be defined, without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. * ''style'' specifies the style used by the entire message box table. This can be used to do things such as modifying the width of the box. * ''textstyle'' relates to the text cell. === ''text'' and ''smalltext'' === Instead of specifying the ''issue'' and the ''fix'' it is possible to use the ''text'' parameter instead. Customised text for the small format can be defined using ''smalltext''. === ''plainlinks'' === Normally on Wikipedia, external links have an arrow icon next to them, like this: [http://www.example.com Example.com]. However, in message boxes, the arrow icon is suppressed by default, like this: <span class="plainlinks">[http://www.example.com Example.com]</span>. To get the normal style of external link with the arrow icon, use {{para|plainlinks|no}}. === ''cat2'', ''cat3'', ''all2'', and ''all3'' === * ''cat2'' and ''cat3'' provide for additional monthly categories; see [[#cat]]. * ''all2'' and ''all3'' provide for additional categories into which all articles are placed, just like [[#all]]. == Technical notes == * If you need to use special characters in the text parameter then you need to escape them like this: <syntaxhighlight lang="xml"> {{mbox |nocat=true | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }} </syntaxhighlight> {{mbox |nocat=true | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }} * The <code>&lt;div></code> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that. * The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons. == TemplateData == <templatedata> { "params": { "1": {}, "small": { "label": "Small Mode", "description": "The small parameter should be passed through the template, as this will allow editors to use the small format by specifying |small=left on an article.", "type": "string", "suggestedvalues": [ "no", "left" ] }, "talk": {}, "date": {}, "name": { "label": "Template Name", "description": "The name parameter specifies the name of the template, without the Template namespace prefix. ", "type": "string" }, "type": {}, "image": {}, "sect": {}, "issue": {}, "fix": {}, "info": {}, "cat": {}, "all": {}, "imageright": {}, "class": {}, "text ": {}, "plainlinks": {}, "smallimage ": {}, "smallimageright": {}, "textstyle": {}, "style ": {}, "smalltext": {}, "cat2": {}, "cat3": {}, "all2": {}, "all3": {} }, "paramOrder": [ "name", "small", "type", "image", "sect", "issue", "fix", "talk", "date", "1", "info", "cat", "all", "imageright", "class", "text ", "plainlinks", "smallimage ", "smallimageright", "textstyle", "style ", "smalltext", "cat2", "cat3", "all2", "all3" ] } </templatedata> <includeonly>[[Category:Notice templates]]</includeonly> 7b00ac1be5a47eeb858d5ff75f02906ce5d85ff2 Module:Message box/configuration 828 846 1653 2022-10-21T22:38:02Z Pppery 34 Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix'}, }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, imageEmptyCellStyle = true, templateCategory = 'Talk message boxes' } } c6bd9191861b23e474e12b19c694335c4bc3af5f Template:Mbox 10 835 1627 2022-10-21T23:02:23Z Pppery 34 Reverted edits by [[Special:Contributions/Pppery|Pppery]] ([[User talk:Pppery|talk]]) to last revision by [[User:wikipedia>Amorymeltzer|wikipedia>Amorymeltzer]] wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> c262e205f85f774a23f74119179ceea11751d68e Module:Section link 828 965 1931 2022-10-22T09:09:53Z wikipedia>WOSlinker 0 use require('strict') instead of require('Module:No globals') Scribunto text/plain -- This module implements {{section link}}. require('strict'); local checkType = require('libraryUtil').checkType local p = {} local function makeSectionLink(page, section, display) display = display or section page = page or '' -- MediaWiki doesn't allow these in `page`, so only need to do for `section` if type(section) == 'string' then section = string.gsub(section, "{", "&#x7B;") section = string.gsub(section, "}", "&#x7D;") end return string.format('[[%s#%s|%s]]', page, section, display) end local function normalizeTitle(title) title = mw.ustring.gsub(mw.ustring.gsub(title, "'", ""), '"', '') title = mw.ustring.gsub(title, "%b<>", "") return mw.title.new(title).prefixedText end function p._main(page, sections, options, title) -- Validate input. checkType('_main', 1, page, 'string', true) checkType('_main', 3, options, 'table', true) if sections == nil then sections = {} elseif type(sections) == 'string' then sections = {sections} elseif type(sections) ~= 'table' then error(string.format( "type error in argument #2 to '_main' " .. "(string, table or nil expected, got %s)", type(sections) ), 2) end options = options or {} title = title or mw.title.getCurrentTitle() -- Deal with blank page names elegantly if page and not page:find('%S') then page = nil options.nopage = true end -- Make the link(s). local isShowingPage = not options.nopage if #sections <= 1 then local linkPage = page or '' local section = sections[1] or 'Notes' local display = '§&nbsp;' .. section if isShowingPage then page = page or title.prefixedText if options.display and options.display ~= '' then if normalizeTitle(options.display) == normalizeTitle(page) then display = options.display .. ' ' .. display else error(string.format( 'Display title "%s" was ignored since it is ' .. "not equivalent to the page's actual title", options.display ), 0) end else display = page .. ' ' .. display end end return makeSectionLink(linkPage, section, display) else -- Multiple sections. First, make a list of the links to display. local ret = {} for i, section in ipairs(sections) do ret[i] = makeSectionLink(page, section) end -- Assemble the list of links into a string with mw.text.listToText. -- We use the default separator for mw.text.listToText, but a custom -- conjunction. There is also a special case conjunction if we only -- have two links. local conjunction if #sections == 2 then conjunction = '&#8203; and ' else conjunction = ', and ' end ret = mw.text.listToText(ret, nil, conjunction) -- Add the intro text. local intro = '§§&nbsp;' if isShowingPage then intro = (page or title.prefixedText) .. ' ' .. intro end ret = intro .. ret return ret end end function p.main(frame) local yesno = require('Module:Yesno') local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Section link', valueFunc = function (key, value) value = value:match('^%s*(.-)%s*$') -- Trim whitespace -- Allow blank first parameters, as the wikitext template does this. if value ~= '' or key == 1 then return value end end }) for k, v in pairs(args) do -- replace underscores in the positional parameter values if 'number' == type(k) then if not yesno (args['keep-underscores']) then -- unless |keep-underscores=yes args[k] = mw.uri.decode (v, 'WIKI'); -- percent-decode; replace underscores with space characters else args[k] = mw.uri.decode (v, 'PATH'); -- percent-decode; retain underscores end end end -- Sort the arguments. local page local sections, options = {}, {} for k, v in pairs(args) do if k == 1 then -- Doing this in the loop because of a bug in [[Module:Arguments]] -- when using pairs with deleted arguments. page = mw.text.decode(v, true) elseif type(k) == 'number' then sections[k] = v else options[k] = v end end options.nopage = yesno (options.nopage); -- make boolean -- Extract section from page, if present if page then local p, s = page:match('^(.-)#(.*)$') if p then page, sections[1] = p, s end end -- Compress the sections array. local function compressArray(t) local nums, ret = {}, {} for num in pairs(t) do nums[#nums + 1] = num end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end sections = compressArray(sections) return p._main(page, sections, options) end return p 5cc61d43dc601ca43e9472500fc5cd09ca7cea44 Template:Plainlist/styles.css 10 927 1845 2022-12-11T06:59:53Z wikipedia>Izno 0 add this reset from mobile.css sanitized-css text/css /* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } 51706efa229ff8794c0d94f260a208e7c5e6ec30 Template:Hidden end 10 961 1923 2022-12-12T14:54:45Z wikipedia>Terasail 0 Only noinclude once wikitext text/x-wiki <includeonly></div></div></includeonly><noinclude> {{hatnote|Templates {{noredirect|Template:End hidden|End hidden}} and {{noredirect|Template:End hidden section|End hidden section}} redirect here.}} {{Documentation|Template:Hidden begin/doc}} </noinclude> 6cc7eb4776ef10092d5f7d48da123117e7b430b2 Template:Plainlist 10 871 1719 2022-12-12T22:45:26Z wikipedia>Izno 0 add tstyles here wikitext text/x-wiki <templatestyles src="Plainlist/styles.css"/><div class="plainlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> 582fe7098c25c1ecfc0ad32f62ecd674ebe2bdf0 Template:Hidden begin 10 960 1921 2022-12-13T16:00:54Z wikipedia>Terasail 0 Remove tracking now that parameters have been removed from transclusions wikitext text/x-wiki <includeonly><templatestyles src="Template:Hidden begin/styles.css"/><div class="hidden-begin mw-collapsible {{#ifeq:{{{showhide|{{{toggle}}}}}}|left|mw-collapsible-leftside-toggle}} {{#if:{{{expanded|}}}||mw-collapsed}} {{{class|}}}" style="{{#if:{{{width|}}}|width:{{{width}}};}} {{#if:{{{border|}}}|border:{{{border}}};}} {{#if:{{{bgcolor|}}}|background-color:{{{bgcolor}}};}} {{{style|}}}"><!-- --><div class="hidden-title" style="{{#if:{{{ta1|}}}|text-align:{{{ta1}}};}} {{#if:{{{titlebgcolor|}}}|background-color:{{{titlebgcolor}}};}} {{{titlestyle|}}}">{{{title|{{{header|}}}}}}</div><!-- --><div class="hidden-content mw-collapsible-content" style="{{#if:{{{ta2|}}}|text-align:{{{ta2}}};}} {{#if:{{{contentbgcolor|}}}|background-color:{{{contentbgcolor}}};}} {{{contentstyle|{{{bodystyle|}}}}}}"><!-- Content added after the template --></includeonly><noinclude> {{Documentation}} </noinclude> be0f4e092203b931810fbff9ed6a1b7af51c025f Template:Hidden begin/styles.css 10 978 1957 2022-12-15T21:41:20Z Pppery 34 Protection template sanitized-css text/css /* {{pp-template}} */ .hidden-begin { box-sizing: border-box; width: 100%; padding: 5px; border: none; font-size: 95%; } .hidden-title { font-weight: bold; line-height: 1.6; text-align: left; } .hidden-content { text-align: left; } d4ab5680ca52bee10cfd2992f2adc45452c5ab37 Template:Header/doc 10 853 1667 2022-12-16T04:40:31Z Pppery 34 8 revisions imported from [[:meta:Template:Header/doc]] wikitext text/x-wiki {{documentation subpage}} ==Usage== <pre> {{header | title = | shortcut = | notes = | topbarhex = | bodyhex = | titlecolor = | bodycolor = }} </pre> ===Relative links=== On pages with many subpages, using [[m:Help:Link#Subpage_feature|relative links]] is highly recommended. This shortens the code and ensures that pages remain linked together, even if the overall system is moved or reorganised. The three formats are <nowiki>[[/subpage]]</nowiki> (subpage), <nowiki>[[../]]</nowiki> (parent), and <nowiki>[[../sibling]]</nowiki> (sibling); see the example usage below. Note that <nowiki>[[../]]</nowiki> will expand to the title of the parent page, which is ideal if the page is renamed at a later time. ==See also== {{#lst:Template:Template list|header-templates}} 5765ffdddc2682eb2227083ebcc24a126128ac5d Template:Header 10 851 1663 2022-12-16T04:46:16Z Pppery 34 wikitext text/x-wiki {| style="width: 100% !important;" |- | style="border-top: 4px solid #{{{topbarhex|6F6F6F}}}; background-color: #{{{bodyhex|F6F6F6}}}; padding: 10px 15px;" | {{#if:{{{shortcut|}}}| {{shortcut|{{{shortcut|uselang={{{uselang|{{CURRENTCONTENTLANGUAGE}}}}}}}}}}}}<div style="font-size:180%; text-align: left; color: {{{titlecolor|}}}">'''{{{title|{{{1|{{BASEPAGENAME}}}}}}}}'''</div> <div style="padding-top:0.3em; padding-bottom:0.1em; font-size:100%; text-align: left; color: {{{bodycolor|}}}">{{{notes|Put some notes here!}}}</div> |- | style="height: 10px" | |} {{clear}}<noinclude>{{documentation}}[[Category:templates]]</noinclude> 03aac86137ab11bfccbcceb2de919475af2953dd Template:Hlist/styles.css 10 928 1847 2022-12-26T18:00:17Z wikipedia>Izno 0 actually remove that block, someone can dig for authorship sanitized-css text/css /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Module:Infobox 828 953 1903 2022-12-27T21:29:12Z wikipedia>Izno 0 merge hlist here Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Module:List 828 864 1703 2022-12-29T17:57:56Z wikipedia>Izno 0 add templatestyles for hlist Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a Module:Navbox/configuration 828 884 1745 2022-12-29T18:14:27Z wikipedia>Izno 0 get these in Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4148736fd32a93636c0413e73ed38afaef065ec9 Module:Navbar/configuration 828 881 1739 2022-12-29T18:18:21Z wikipedia>Izno 0 add hlist/styles.css Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Navbar 828 880 1737 2022-12-29T18:20:02Z wikipedia>Izno 0 add templatestyles for hlist Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = title:fullUrl('action=edit'), ['url'] = true }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = title:fullUrl('action=history'), ['url'] = true }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 79f907e59eaa8bbf8dd50bb751933ebeaaa7eb17 Template:Advert 10 966 1933 2022-12-29T21:29:07Z wikipedia>Mathglot 0 Add hatnote; [[Template:AD]] redirects here; it is not a [[calendar era]] template. wikitext text/x-wiki <noinclude>{{redirect|Template:AD|the [[calendar era]] template|Template:CE}}</noinclude>{{SAFESUBST:<noinclude />#invoke:Unsubst||date=__DATE__ |$B= {{Ambox | name = Advert | type = content | class= ambox-Advert | issue= This {{{1|article}}} '''contains content that is written like [[Wikipedia:What Wikipedia is not#Wikipedia is not a soapbox or means of promotion|{{#if:{{{2|{{{type|}}}}}}|{{{2|{{{type}}}}}}|an advertisement}}]]'''. | fix = Please help [{{fullurl:{{FULLPAGENAME}}|action=edit}} improve it] by removing [[WP:Spam|promotional content]] and inappropriate [[Wikipedia:External_links#Advertising_and_conflicts_of_interest|external links]], and by adding encyclopedic content written from a [[Wikipedia:Neutral point of view|neutral point of view]]. | removalnotice = yes | cat = Articles with a promotional tone | date = {{{date|}}} | all = All articles with a promotional tone }} }}<noinclude> {{documentation}} </noinclude> 503795cf9361b12bcaed584d6fafb2cc04c11b57 Module:Documentation/styles.css 828 840 1639 2023-01-16T23:40:04Z Pppery 34 sanitized-css text/css .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } /* [[Category:Template stylesheets]] */ 5fb984fe8632dc068db16853a824c9f3d5175dd9 Template:Dated maintenance category (articles) 10 929 1849 2023-02-03T03:07:34Z wikipedia>UtherSRG 0 UtherSRG moved page [[Template:DMCA]] to [[Template:Dated maintenance category (articles)]]: [[Special:Permalink/1137158761|Requested]] by Robertsky at [[WP:RM/TR]]: Per RM discussion. See [[Template_talk:DMCA#Requested_move_26_January_2023]]. Template protected at template editor/admin level wikitext text/x-wiki {{Dated maintenance category |onlyarticles=yes |1={{{1|}}} |2={{{2|}}} |3={{{3|}}} |4={{{4|}}} |5={{{5|}}} }}<noinclude> {{documentation|Template:Dated maintenance category/doc}} </noinclude> 6bbc57c75cc28708a0e71dd658224d5945d80d68 Template:DMCA 10 855 1685 2023-02-03T21:12:07Z wikipedia>Paine Ellsworth 0 add [[WP:RCAT|rcat template]] wikitext text/x-wiki #REDIRECT [[Template:Dated maintenance category (articles)]] {{Redirect category shell| {{R from move}} {{R from modification}} {{R from template shortcut}} }} 711d3f1c53fa704297f675a8dcf1a56719c5b654 Template:Template list 10 852 1665 2023-02-09T23:48:27Z Pppery 34 wikitext text/x-wiki == Resolution templates == {{hatnote|Category: [[:Category:Resolution templates|Resolution templates]]}} <section begin=resolution-templates/> * {{tl|done}} - {{done}} * {{tl|partly done}} - {{partly done}} * {{tl|resolved}} - {{resolved}} * {{tl|not done}} - {{not done}} * {{tl|doing}} - {{doing}} * {{tl|comment}} - {{comment}} * {{tl|on hold}} - {{on hold}} * {{tl|agree}} - {{agree}} * {{tl|withdrawn}} - {{withdrawn}} * {{tl|working}} - {{working}} * {{tl|idea}} - {{idea}} * {{tl|reviewing}} - {{reviewing}} * {{tl|note}} - {{note}} * {{tl|question}} - {{question}} * {{tl|high priority}} - {{high priority}} * {{tl|thank you}} - {{thank you}} * {{tl|pending}} - {{pending}} * {{tl|custom resolution}} - {{custom resolution|Earth Western Hemisphere transparent background.png|What on earth?}} <section end=resolution-templates/> == Voting templates == {{hatnote|Category: [[:Category:Voting templates|Voting templates]]}} <section begin=voting-templates/> * {{tl|support}} - {{support}} * {{tl|oppose}} - {{oppose}} * {{tl|abstain}} - {{abstain}} * {{tl|neutral}} - {{neutral}} <section end=voting-templates/> == Social media userboxes == {{hatnote|Category: [[:Category:Social media userboxes|Social media userboxes]]}} <section begin=social-media-userboxes/> {| class="wikitable" |- <noinclude>! Template !! Result |-</noinclude> | {{tl|User discord}} || {{User discord|nocat=yes}} |- | {{tl|User github}} || {{User github|nocat=yes}} |- | {{tl|User instagram}} || {{User instagram|nocat=yes}} |- | {{tl|User IRC}} || {{User IRC|nocat=yes}} |- | {{tl|User twitter}} || {{User twitter|nocat=yes}} |- | {{tl|User wikimedia}} || {{User wikimedia|nocat=yes}} |- | {{tl|User youtube}} || {{User youtube|nocat=yes}} |} <section end=social-media-userboxes/> [[Category:Templates| ]] 8e433f454d20d59b3b913e007e3d40f9e3c937eb Module:Lua banner 828 911 1813 2023-02-16T14:39:53Z Uzume 41 [[Module:Citation]] has been blanked since [[Wikipedia:Templates for discussion/Log/2018 May 13#Module:Citation]]; remove special handling Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Template:Template display 10 917 1825 2023-02-17T19:32:49Z wikipedia>Jonesey95 0 link wikitext text/x-wiki <includeonly>{{#invoke:Message box|ombox|type=notice |image={{#switch:{{{1}}}|adaptive=[[File:Different devices simple.svg|65x65px|link=|alt=]]|nomobile=[[File:Handheld devices no.svg|55px|link=|alt=]]|nodesktop=[[File:Desktop devices no.svg|55px|link=|alt=]]}} |text={{#switch:{{{1}}} | adaptive = This template is [[Adaptive web design|responsive]] and <strong>displays differently in mobile and desktop view</strong>. Read the documentation for an explanation of the differences and why they exist. | nomobile = This template does ''not'' display in the mobile view of Wikipedia; it is <strong>desktop only</strong>. Read the documentation for an explanation. | nodesktop = This template does ''not'' display in the desktop view of Wikipedia; it is <strong>mobile only</strong>. Read the documentation for an explanation. | nomobilesidebar = This template does ''not'' display in the mobile view of Wikipedia; it is <strong>desktop only</strong>. Read the [[Template:Sidebar/doc|parent documentation]] for an explanation. | vector2022 = This template does not work properly in the [[Wikipedia:Vector 2022|Vector 2022]] skin. Read the documentation for an explanation. | #default = {{{1}}} }}}}</includeonly><noinclude> {{Documentation}} </noinclude> 47cc41eacc2d2dec246f01b81111b280cec901a3 Module:Sidebar/configuration 828 889 1755 2023-03-14T22:32:24Z wikipedia>Izno 0 add hlist and plainlist_templatestyles keys Scribunto text/plain return { i18n = { child_yes = 'yes', float_none = 'none', float_left = 'left', wrap_true = 'true', navbar_none = 'none', navbar_off = 'off', default_list_title = 'List', title_not_to_add_navbar = 'Template:Sidebar', collapse_title_not_to_add_navbar = 'Template:Sidebar with collapsible lists', templatestyles = 'Module:Sidebar/styles.css', hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', category = { child = '[[Category:Pages using sidebar with the child parameter]]', conversion = '[[Category:Sidebars with styles needing conversion]]' }, pattern = { collapse_sandbox = '/sandbox$', sandbox = '/sandbox$', subgroup = 'sidebar%-subgroup', style_conversion = 'style$', uncategorized_conversion_titles = { '/[Ss]andbox', '/[Tt]estcases', '/[Dd]oc$' } }, class = { sidebar = 'sidebar', subgroup = 'sidebar-subgroup', collapse = 'sidebar-collapse', float_none = 'sidebar-none', float_left = 'sidebar-left', wraplinks = 'nowraplinks', outer_title = 'sidebar-outer-title', top_image = 'sidebar-top-image', top_caption = 'sidebar-top-caption', pretitle = 'sidebar-pretitle', pretitle_with_top_image = 'sidebar-pretitle-with-top-image', title = 'sidebar-title', title_with_pretitle = 'sidebar-title-with-pretitle', image = 'sidebar-image', caption = 'sidebar-caption', above = 'sidebar-above', heading = 'sidebar-heading', content = 'sidebar-content', content_with_subgroup = 'sidebar-content-with-subgroup', below = 'sidebar-below', navbar = 'sidebar-navbar', list = 'sidebar-list', list_title = 'sidebar-list-title', list_title_centered = 'sidebar-list-title-c', list_content = 'sidebar-list-content' } } } dc2a980ac2162a898f7c21e6d6ba7e994dfeb315 Module:Sidebar 828 888 1753 2023-03-14T22:35:53Z wikipedia>Izno 0 move these items to config, discovered during work at meta Scribunto text/plain require('strict') local cfg = mw.loadData('Module:Sidebar/configuration') local p = {} local getArgs = require('Module:Arguments').getArgs --[[ Categorizes calling templates and modules with a 'style' parameter of any sort for tracking to convert to TemplateStyles. TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module. TODO would probably want to remove /log and /archive as CS1 does ]] local function categorizeTemplatesWithInlineStyles(args) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 and title.namespace ~= 828 then return '' end for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == 'width' then return cfg.i18n.category.conversion end end end --[[ For compatibility with the original {{sidebar with collapsible lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]] -- See ([[meta:Help:Newlines and spaces#Automatic newline]]) local function trimAndAddAutomaticNewline(s) s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then return '\n' .. s else return s end end --[[ Finds whether a sidebar has a subgroup sidebar. ]] local function hasSubgroup(s) if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then return true else return false end end local function has_navbar(navbar_mode, sidebar_name) return navbar_mode ~= cfg.i18n.navbar_none and navbar_mode ~= cfg.i18n.navbar_off and ( sidebar_name or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, '') ~= cfg.i18n.title_not_to_add_navbar ) end local function has_list_class(args, htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, value in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, 'class') then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles(args) local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(args, htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local plainlist_styles = add_list_templatestyles('plainlist', cfg.i18n.plainlist_templatestyles) local hlist_styles = add_list_templatestyles('hlist', cfg.i18n.hlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar(args.navbar, args.name) and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.hlist_templatestyles} } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note] return hlist_styles .. plainlist_styles end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end --[[ Main sidebar function. Takes the frame, args, and an optional collapsibleClass. The collapsibleClass is and should be used only for sidebars with collapsible lists, as in p.collapsible. ]] function p.sidebar(frame, args, collapsibleClass) if not args then args = getArgs(frame) end local hiding_templatestyles = table.concat(move_hiding_templatestyles(args)) local root = mw.html.create() local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes root = root:tag('table') if not child then root :addClass(cfg.i18n.class.sidebar) -- force collapsibleclass to be sidebar-collapse otherwise output nothing :addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) :addClass('nomobile') :addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) :addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil) :addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil) :addClass(args.bodyclass or args.class) :css('width', args.width or nil) :cssText(args.bodystyle or args.style) if args.outertitle then root :tag('caption') :addClass(cfg.i18n.class.outer_title) :addClass(args.outertitleclass) :cssText(args.outertitlestyle) :wikitext(args.outertitle) end if args.topimage then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.top_image) :addClass(args.topimageclass) :cssText(args.topimagestyle) :wikitext(args.topimage) if args.topcaption then imageCell :tag('div') :addClass(cfg.i18n.class.top_caption) :cssText(args.topcaptionstyle) :wikitext(args.topcaption) end end if args.pretitle then root :tag('tr') :tag('td') :addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image or cfg.i18n.class.pretitle) :addClass(args.pretitleclass) :cssText(args.basestyle) :cssText(args.pretitlestyle) :wikitext(args.pretitle) end else root :addClass(cfg.i18n.class.subgroup) :addClass(args.bodyclass or args.class) :cssText(args.bodystyle or args.style) end if args.title then if child then root :wikitext(args.title) else root :tag('tr') :tag('th') :addClass(args.pretitle and cfg.i18n.class.title_with_pretitle or cfg.i18n.class.title) :addClass(args.titleclass) :cssText(args.basestyle) :cssText(args.titlestyle) :wikitext(args.title) end end if args.image then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.image) :addClass(args.imageclass) :cssText(args.imagestyle) :wikitext(args.image) if args.caption then imageCell :tag('div') :addClass(cfg.i18n.class.caption) :cssText(args.captionstyle) :wikitext(args.caption) end end if args.above then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.above) :addClass(args.aboveclass) :cssText(args.abovestyle) :newline() -- newline required for bullet-points to work :wikitext(args.above) end local rowNums = {} for k, v in pairs(args) do k = '' .. k local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$') if num then table.insert(rowNums, tonumber(num)) end end table.sort(rowNums) -- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 -- and content3 are specified) for i = #rowNums, 1, -1 do if rowNums[i] == rowNums[i - 1] then table.remove(rowNums, i) end end for i, num in ipairs(rowNums) do local heading = args['heading' .. num] if heading then root :tag('tr') :tag('th') :addClass(cfg.i18n.class.heading) :addClass(args.headingclass) :addClass(args['heading' .. num .. 'class']) :cssText(args.basestyle) :cssText(args.headingstyle) :cssText(args['heading' .. num .. 'style']) :newline() :wikitext(heading) end local content = args['content' .. num] if content then root :tag('tr') :tag('td') :addClass(hasSubgroup(content) and cfg.i18n.class.content_with_subgroup or cfg.i18n.class.content) :addClass(args.contentclass) :addClass(args['content' .. num .. 'class']) :cssText(args.contentstyle) :cssText(args['content' .. num .. 'style']) :newline() :wikitext(content) :done() -- Without a linebreak after the </td>, a nested list like -- "* {{hlist| ...}}" doesn't parse correctly. :newline() end end if args.below then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.below) :addClass(args.belowclass) :cssText(args.belowstyle) :newline() :wikitext(args.below) end if not child and has_navbar(args.navbar, args.name) then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.navbar) :cssText(args.navbarstyle) :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, fontstyle = args.navbarfontstyle }) end local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles } } local templatestyles = '' if args['templatestyles'] and args['templatestyles'] ~= '' then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] and args['child templatestyles'] ~= '' then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ add_list_styles(args), -- see [hlist_note] above about ordering base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles, hiding_templatestyles, tostring(root), (child and cfg.i18n.category.child or ''), categorizeTemplatesWithInlineStyles(args) }) end local function list_title(args, is_centered_list_titles, num) local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or cfg.i18n.default_list_title) local title if is_centered_list_titles then -- collapsible can be finicky, so provide some CSS/HTML to support title = mw.html.create('div') :addClass(cfg.i18n.class.list_title_centered) :wikitext(title_text) else title = mw.html.create() :wikitext(title_text) end local title_container = mw.html.create('div') :addClass(cfg.i18n.class.list_title) -- don't /need/ a listnumtitleclass because you can do -- .templateclass .listnumclass .sidebar-list-title :addClass(args.listtitleclass) :cssText(args.basestyle) :cssText(args.listtitlestyle) :cssText(args['list' .. num .. 'titlestyle']) :node(title) :done() return title_container end --[[ Main entry point for sidebar with collapsible lists. Does the work of creating the collapsible lists themselves and including them into the args. ]] function p.collapsible(frame) local args = getArgs(frame) if not args.name and frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, '') == cfg.i18n.collapse_title_not_to_add_navbar then args.navbar = cfg.i18n.navbar_none end local contentArgs = {} local is_centered_list_titles = false if args['centered list titles'] and args['centered list titles'] ~= '' then is_centered_list_titles = true end for k, v in pairs(args) do local num = string.match(k, '^list(%d+)$') if num then local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name']) local row = mw.html.create('div') row :addClass(cfg.i18n.class.list) :addClass('mw-collapsible') :addClass((not expand) and 'mw-collapsed' or nil) :addClass(args['list' .. num .. 'class']) :cssText(args.listframestyle) :cssText(args['list' .. num .. 'framestyle']) :node(list_title(args, is_centered_list_titles, num)) :tag('div') :addClass(cfg.i18n.class.list_content) :addClass('mw-collapsible-content') -- don't /need/ a listnumstyleclass because you can do -- .templatename .listnumclass .sidebar-list :addClass(args.listclass) :cssText(args.liststyle) :cssText(args['list' .. num .. 'style']) :wikitext(trimAndAddAutomaticNewline(args['list' .. num])) contentArgs['content' .. num] = tostring(row) end end for k, v in pairs(contentArgs) do args[k] = v end return p.sidebar(frame, args, cfg.i18n.class.collapse) end return p 71fe765846593e025ca2f94371315e9dbb5bb4d2 Template:Self-reference 10 915 1821 2023-03-30T11:42:06Z wikipedia>Mclay1 0 Mclay1 moved page [[Template:Self reference]] to [[Template:Self-reference]]: grammatically correct hyphen wikitext text/x-wiki {{#switch:{{{2|NONE}}} |NONE|hatnote|hat={{Hatnote|extraclasses=plainlinks selfreference noprint|1={{{1}}}}} |inline=<div class="plainlinks selfreference" style="display:inline; font-style: italic;"><!--Same style as class hatnote.-->{{{1}}}</div> |<!--Matching the empty string here for unprintworthy content is for backwards compatibility with the 2006-2008 version. Do not depend on it!-->=<div style="display:inline;" class="plainlinks selfreference noprint">{{{1}}}</div> |#default={{error|Second parameter must be <code>hatnote</code>, <code>hat</code>, or <code>inline</code>}} }}<noinclude> {{Documentation}} <!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES THE /doc SUBPAGE, AND INTERWIKIS TO WIKIDATA, THANKS --> </noinclude> 0c4a08f880070e918c3edcaa50cc493f99841e98 Template:Selfref 10 904 1799 2023-03-30T20:46:51Z wikipedia>Xqbot 0 Bot: Fixing double redirect to [[Template:Self-reference]] wikitext text/x-wiki #REDIRECT [[Template:Self-reference]] {{Redirect category shell| {{R from template shortcut}} {{R from alternative spelling}} {{R from move}} }} 030c372ed4f83fa2e03a4c0ccdd4ad3cef8ec9e6 Module:Category handler/doc 828 948 1885 2023-04-01T14:06:49Z Uzume 41 lua wikitext text/x-wiki {{Used in system}} {{Module rating|p}} {{Lua|Module:Category handler/data|Module:Category handler/shared|Module:Category handler/blacklist|Module:Yesno|Module:Arguments}} This module implements the {{tl|category handler}} template. The category handler template helps other templates to automate both categorization and [[Wikipedia:Category suppression|category suppression]]. For information about using the category handler template in other templates, please see the '''[[Template:Category handler|template documentation]]'''. Keep reading for information about using the category handler module in other Lua modules, or for information on exporting this module to other wikis. == Use from other Lua modules == === When not to use this module === For cases where a module only needs to categorise in one of the namespaces main (articles), file (images) or category, then using this module is overkill. Instead, you can simply get a title object using [[mw:Extension:Scribunto/Lua reference manual#mw.title.getCurrentTitle|mw.title.getCurrentTitle]] and check the <code>nsText</code> field. For example: <syntaxhighlight lang="lua"> local title = mw.title.getCurrentTitle() if title.nsText == 'File' then -- do something end </syntaxhighlight> However, if your module needs to categorize in any other namespace, then we recommend you use this module, since it provides proper category suppression and makes it easy to select how to categorize in the different namespaces. === Namespaces === This module detects and groups all the different [[Wikipedia:Namespace|namespaces]] used on Wikipedia into several types. These types are used as parameter names in this module. :'''main''' = Main/article space, as in normal Wikipedia articles. :'''talk''' = Any talk space, such as page names that start with "Talk:", "User talk:", "File talk:" and so on. :'''user, wikipedia, file ... = The other namespaces except the talk pages. Namespace aliases are also accepted. See the table below for the full list.''' :'''other''' = Any namespaces that were not specified as a parameter to the template. See examples below. ;List of possible namespace parameters (excluding <code>''talk''</code> and <code>''other''</code>) {{#invoke:Namespace detect|table}} === Basic usage === This module takes two or more parameters. Here's an example using a hello world program: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'Hello world!' local category = categoryHandler{ '[[Category:Somecat]]', nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> The above example uses the default settings for the category handler module. That means the example module will categorize on pages in the following namespaces: :'''main''', '''file''', '''help''', '''category''', '''portal''' and '''book''' But it will ''not'' categorize in any other namespaces, e.g.: :'''talk''', '''user''', '''wikipedia''', '''mediawiki''', '''template''' ... And it will ''not'' categorize on blacklisted pages. (See section [[#Blacklist|blacklist]] below.) The reason the category handler module does not categorize in some of the namespaces is that in those namespaces most modules and templates are just demonstrated or listed, not used. Thus most modules and templates should not categorize in those namespaces. Any module or template that is meant for one or more of the namespaces where this module categorizes can use the basic syntax as shown above. === Advanced usage === This module takes one or more parameters named after the different page types as listed in section [[#Namespaces|namespaces]] above. By using those parameters you can specify exactly in which namespaces your template should categorize. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module meant for articles and talk pages.' local category = categoryHandler{ main = '[[Category:Somecat1]]', -- Categorize in main (article) space talk = '[[Category:Somecat2]]', -- Categorize in talk space nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> The above module will only categorize in main and talk space. But it will not categorize on /archive pages since they are blacklisted. (See section [[#Blacklist|blacklist]] below.) And if you need to demonstrate (discuss) the module on a talkpage, then you can feed "<code>nocat='true'</code>" to prevent that template from categorizing. (See section [[#Nocat|nocat]] below.) Like this: <pre> == My new module == Hey guys, have you seen my new module? {{#invoke:mymodule|main|nocat=true}} Nice, isn't it? --~~~~ </pre> Sometimes we want to use the same category in several namespaces, then do like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used in several namespaces.' local category = categoryHandler{ main = '[[Category:Somecat1]]', [ 1 ] = '[[Category:Somecat2]]', -- For help and user space help = 1, user = 1, talk = '', -- No categories on talk pages other = '[[Category:Somecat3]]', -- For all other namespaces nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> In the above example we use a numbered parameter to feed one of the categories, and then we tell this module to use that numbered parameter for both the help and user space. The category handler module understands an unlimited number of numbered parameters. The '''other''' parameter defines what should be used in the remaining namespaces that have not explicitly been fed data. Note the empty but defined '''talk''' parameter. That stops this module from showing what has been fed to the '''other''' parameter, when in talk space. The category handler module also has a parameter called '''all'''. It works like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used in all namespaces.' local category = categoryHandler{ all = '[[Category:Somecat1]]', -- Categorize in all namespaces nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> The above example will categorize in all namespaces, but not on blacklisted pages. If you want to demonstrate that module on a page, then use "<code>nocat=true</code>" to prevent the template from categorizing. We suggest avoiding the '''all''' parameter, since modules and templates should preferably only categorize in the namespaces they need to. The all parameter can also be combined with the rest of the parameters. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used in all namespaces.' local category = categoryHandler{ all = '[[Category:Somecat1]]', -- Categorize in all namespaces main = '[[Category:Somecat2]]', -- And add this in main space other = '[[Category:Somecat3]]', -- And add this in all other namespaces nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> If the above module is placed on an article, then it will add the categories "Somecat1" and "Somecat2". But on all other types of pages it will instead add "Somecat1" and "Somecat3". As the example shows, the all parameter works independently of the rest of the parameters. === Subpages === The category handler module understands the '''subpage''' parameter. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used in all namespaces.' local category = categoryHandler{ subpage = 'no' -- Don't categorize on subpages wikipedia = '[[Category:Somecat]]', nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> If "<code>subpage='no'</code>" then this template will ''not'' categorize on subpages. For the rare occasion you ''only'' want to categorize on subpages, then use "<code>subpage='only'</code>". If '''subpage''' is empty or undefined then this template categorizes both on basepages and on subpages. === Blacklist === This module has a blacklist of the pages and page types where templates should not auto-categorize. Thus modules that use this meta-template will for instance not categorize on /archive pages and on the subpages of [[Wikipedia:Template messages]]. If you want a template to categorize on a blacklisted page, then feed "<code><nowiki>nocat = false</nowiki></code>" to the module when you place it on the page, thus skipping the blacklist check. Note that this module only categorizes if it has data for the namespace. For instance, if the basic syntax is used (see [[#Basic usage|basic usage]] above), then even if you set "<code>nocat = false</code>" the template will not categorize on a talk page, since it has no data for talk pages. But it has data for help space, so on a blacklisted help page it will categorize. The blacklist is located in the configuration table <code>cfg.blacklist</code> near the top of the module code. === The "nocat" parameter === This module understands the '''nocat''' parameter: * If "<code>nocat = true</code>" then this template does ''not'' categorize. * If '''nocat''' is <code>nil</code> then this template categorizes as usual. * If "<code>nocat = false</code>" this template categorizes even when on blacklisted pages. (See section [[#Blacklist|blacklist]] above.) * The nocat parameter also accepts aliases for <code>true</code> and <code>false</code> as defined by [[Module:Yesno]], e.g. "yes", "y", "true", and 1 for <code>true</code>, and "no", "n", "false", and 0 for <code>false</code>. Modules and templates that use {{tlf|category handler}} should forward '''nocat''', so they too understand '''nocat'''. The code "<code>nocat = frame.args.nocat</code>" shown in the examples on this page does that. === The "categories" parameter === For backwards compatibility this module also understands the '''categories''' parameter. It works the same as '''nocat'''. Like this: * If "<code>categories = false</code>" then this template does ''not'' categorize. * If '''categories''' is empty or undefined then this template categorizes as usual. * If "<code>categories = true</code>" this template categorizes even when on blacklisted pages. * The categories parameter also accepts aliases for <code>true</code> and <code>false</code> as defined by [[Module:Yesno]], e.g. "yes", "y", "true", and 1 for <code>true</code>, and "no", "n", "false", and 0 for <code>false</code>. === The "category2" parameter === For backwards compatibility this template kind of supports the old "category =" parameter. But the parameter name "category" is already used in this module to feed category data for when in category space. So instead this template uses '''category2''' for the usage similar to '''nocat'''. Like this: * If "<code>category2 = "</code>" (empty but defined), or "<code>category2 = 'no'</code>", or if '''category2''' is fed any other data (except as described in the next two points), then this template does ''not'' categorize. * If '''category2''' is undefined or if "<code>category2 = '¬'</code>", then this template categorizes as usual. * If "<code>category2 = 'yes'</code>" this template categorizes even when on blacklisted pages. === Categories and text === Besides from categories, you can feed anything else to this module, for instance some text. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used on talk pages.' local category = categoryHandler{ talk = '[[Category:Somecat]]', other = '<p class="error">This module should only be used on talk pages.</p>', nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> When the module code above is used on anything other than a talk page, it will look like this: :This is a module used on talk pages.{{#invoke:category handler|main | talk = [[Category:Somecat]] | other = <p class="error">This module should only be used on talk pages.</p> | nocat = {{{nocat|}}} <!--So "nocat=true/false" works--> }} That text will not show on blacklisted pages, so don't use this method to show any important information. Feeding "<code>nocat = 'true'</code>" to the template hides the text, just as it suppresses any categories. === The "page" parameter === For testing and demonstration purposes this module can take a parameter named '''page'''. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local category = categoryHandler{ main = 'Category:Some cat', talk = 'Category:Talk cat', nocat = frame.args.nocat, -- So "nocat=true/false" works page = 'User talk:Example' } return category end return p </syntaxhighlight> In the above code we on purpose left out the brackets around the category names so we see the output on the page. No matter on what kind of page the code above is used it will return this: :{{#invoke:category handler|main | main = Category:Some cat | talk = Category:Talk cat | nocat = {{{nocat|}}} <!--So "nocat=true/false" works--> | page = User talk:Example }} The '''page''' parameter makes this module behave exactly as if on that page. Even the blacklist works. The pagename doesn't have to be an existing page. If the '''page''' parameter is empty or undefined, the name of the current page determines the result. You can make it so your module also understands the '''page''' parameter. That means you can test how your template will categorize on different pages, without having to actually edit those pages. Then do like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local category = categoryHandler{ main = 'Category:Some cat', talk = 'Category:Talk cat', nocat = frame.args.nocat, -- So "nocat=true/false" works page = frame.args.page -- For testing } return category end return p </syntaxhighlight> === Parameters === List of all parameters: * First positional parameter - for default settings * subpage = 'no' / 'only' * 1, 2, 3 ... * all = '<nowiki>[[Category:Somecat]]</nowiki>' / 'Text' * main = 1, 2, 3 ... / '<nowiki>[[Category:Somecat]]</nowiki>' / 'Text' * ... * other = 1, 2, 3 ... / '<nowiki>[[Category:Somecat]]</nowiki>' / 'Text' * nocat = frame.args.nocat / true / false / 'yes' / 'no' / 'y' / 'n' / 'true' / 'false' / 1 / 0 * categories = frame.args.categories / false / true / 'no' / 'yes' / 'n' / 'y' / 'false' / 'true' / 0 / 1 * category2 = frame.args.category or '¬' / 'no' / 'not defined' / '¬' / 'yes' * page = frame.args.page / 'User:Example' Note that empty values to the "main" ... "other" parameters have special meaning (see examples above). The "all" parameter doesn't understand numbered parameters, since there should never be a need for that. == Exporting to other wikis == This module can be exported to other wikis by changing the configuration values in the <code>cfg</code> table. All the variable values are configurable, so after the configuration values have been set there should be no need to alter the main module code. Details of each configuration value are included in the module code comments. In addition, this module requires [[Module:Namespace detect]] to be available on the local wiki. == See also == * {{tl|Category handler}} – for using this module with templates, rather than Lua modules. * [[Wikipedia:Category suppression]] – The how-to guide. * [[Wikipedia:WikiProject Category Suppression]] – The WikiProject. * [[Wikipedia:Namespace]] – Lists all the namespaces. 603e893f1993e7e6fa21bb562e50d87d4daccf94 Template:Documentation subpage 10 836 1793 1631 2023-04-29T17:27:17Z wikipedia>Paine Ellsworth 0 m wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 41ca90af0945442788a2dbd08c8c54a61a23c057 Module:Protection banner/config 828 887 1751 2023-05-08T11:41:01Z wikipedia>Fayenatic london 0 Update categories from "fully-protected" to "fully protected", removing hyphen, per valid request at [[WP:CFDS]] Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } a20552ae38cb5253a4fa29aa126abc74215a589f Template:As of 10 891 1759 2023-05-18T21:22:11Z wikipedia>Sdkb 0 Adding {{yesno}} to make {{{since}}} and {{{lc}}} variables case-insensitive, per [[WP:SILENTCONSENSUS|silent]] consensus [[Template_talk:As_of/Archive_1#Yesno?|at talk]] wikitext text/x-wiki <!--{{As of}} begin--><includeonly><!-- ## param 1 is the year ## optional param 2 is the month ## optional param 3 is the day of the month ## optional named parameter alt=[text] is alternative display text (may include wiki markup) ## optional named parameter df=US produces American date format in displayed text ## optional named parameter lc=on gives lower-case-first output ## optional named parameter url=[URL] gives statement reference ## displayed text ([A/a]s of [Start date] by default) -->{{#if: {{{alt|}}} | {{{alt}}} | {{#if:{{{bare|}}}||{{#if:{{yesno|{{{since|}}}}}|{{#if: {{yesno|{{{lc|}}}}} | s | S }}ince | {{#if: {{yesno|{{{lc|}}}}} | a | A }}s of}}}} {{#if:{{{pre|}}}|{{{pre}}}&#32;}}{{#if: {{{3|}}} | {{#ifeq:{{lc:{{{df|}}}}}|us|{{MONTHNAME|{{{2}}}}}&nbsp;{{#expr:{{{3}}}}},&#32;|{{#expr:{{{3}}}}}&nbsp;{{MONTHNAME|{{{2}}}}}&nbsp;}}{{{1}}}|{{#if: {{{2|}}} |{{MONTHNAME|{{{2}}}}}&nbsp;}}{{{1}}}}}}}{{#if:{{{post|}}}|<nowiki />{{{post}}}}}<!-- #### That nowiki is required or, various characters (:, ;, #, and *} will be parsed as wikisyntax for list items. ## ref/update inline banner (hidden by default) --><sup class="plainlinks noexcerpt noprint asof-tag {{#if:{{{url|}}}|ref|update}}" style="display:none;">[{{#if:{{{url|}}}|{{{url}}} &#91;ref&#93;|{{fullurl:{{PAGENAME}}|action=edit}} &#91;update&#93;}}]</sup><!-- ## categorisation disabled outside main namespace -->{{DMCA|Articles containing potentially dated statements|from|<!-- ## temporal category for template (word method) -->{{#if: {{#ifexpr: {{{1}}} = 1 }} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 2004 | {{{1}}} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 1989 | {{#time:Y|{{{1}}}}} | before 1990 }}}} | <!-- ## temporal category for template (parameter method) -->{{#ifexpr: {{{1}}} > 2004 | {{#if:{{{2|}}} | {{MONTHNAME|{{{2}}}}} }} {{{1}}} | {{#ifexpr:{{{1}}} > 1989 | {{{1}}} | before 1990 }}}}}}|<!-- ## global category for template -->All articles containing potentially dated statements}}</includeonly><!--{{As of}} end--><noinclude><!-- ## dynamic example (as of today, self ref) -->{{As of|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}<sup class="plainlinks">[https://en.wikipedia.org/wiki/Template:As_of &#91;ref&#93;]</sup> {{documentation}} <!-- Add categories and inter-wikis to the /doc subpage, not here! --> </noinclude>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using as of template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:As of]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | alt | bare | df | lc | post | pre | since | url }} dd0794e75a86855d0ccc649adeaa8be5d3c3c704 Module:Navbox 828 883 1743 2023-05-28T13:26:56Z Uzume 41 strict Scribunto text/plain require('strict') local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and mw.uri.anchorEncode(args[cfg.arg.above]) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end function p._navbox(navboxArgs) args = navboxArgs local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p 05be9a97c035ab3f0fac69423779e261949d473c Template:High-use 10 906 1803 2023-05-30T09:39:48Z wikipedia>Lectonar 0 Changed protection settings for "[[Template:High-use]]": [[WP:High-risk templates|High-risk template or module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) wikitext text/x-wiki {{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}|system={{{system|}}}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --> </noinclude> a3322d1bd47ac03df14fa2090855cff4fede9bc7 Module:High-use 828 909 1809 2023-05-30T11:20:32Z wikipedia>Lectonar 0 Changed protection settings for "[[Module:High-use]]": [[WP:High-risk templates|High-risk template or module]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return_value = "a very large number of" else return_value = "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) local return_value = "" if frame.args[1] == "risk" then return_value = "risk" else local count = _fetch(frame) if count and count >= 100000 then return_value = "risk" end end return return_value end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p 134551888e066954a89c109d2faa8af71a4454a4 Module:Transclusion count 828 910 1811 2023-05-30T20:51:38Z wikipedia>Isabelle Belato 0 Changed protection settings for "[[Module:Transclusion count]]": [[WP:High-risk templates|Highly visible template]]; requested at [[WP:RfPP]] ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 000ef6bcbf7b66e727870b0c300c4009da300513 Template:Navbox visibility 10 921 1833 2023-06-03T15:34:42Z wikipedia>WhatamIdoing 0 Update wikitext text/x-wiki Templates using the classes <code>class=navbox</code> ({{tl|navbox}}) or <code>class=nomobile</code> ({{tl|sidebar}}) are not displayed on the [https://en.m.wikipedia.org/ mobile web site] of English Wikipedia. Mobile page views account for approximately 65% of all page views (90-day average {{as of|May 2023|lc=y}}).<noinclude> {{documentation}} </noinclude> 3b1f65df829fd9f96b9c4f002fba38a0fd987a6b Module:Documentation 828 838 1779 1635 2023-06-17T01:23:52Z wikipedia>Izno 0 per tper Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '' local pagetype if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') else pagetype = message('sandbox-notice-pagetype-other') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(message('sandbox-category')) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle local purgeLink = makeWikilink("Special:Purge/" .. docTitle.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 728908c27cb1e65ac402f1af8a9e4f144ddc3d0d Template:Navbox suite 10 918 1827 2023-06-23T20:58:18Z wikipedia>Andrybak 0 categorization wikitext text/x-wiki {{#invoke:sidebar|sidebar | width = auto | bodystyle = border-spacing:0;background:#f7f7f7;padding:2px; | title = Navbox suite | titlestyle = padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; background-color: #ccf; | contentclass = plainlist | contentstyle = padding:0.25em;background:#fdfdfd; | content1 = *{{tl|Navbox}} *{{tl|Navbox with collapsible groups}} *{{tl|Navbox with columns}} *{{tl|Navboxes}} | navbarstyle = background:#fdfdfd;padding:0 5px }}<!-- NOTE: A template MUST support all of the parameters marked with a cross in Template:Navbox/doc in order to be Navbox suite compliant. In particular, the name, state, border, and navbar parameters are especially important. --><noinclude> {{Documentation|content= Helper template for linking between main navbox templates in their documentation. [[Category:Wikipedia-internal sidebar templates]] [[Category:Navbox meta-templates|Δ]]<!-- Δ for documentation ([[WP:SORTKEY]]) --> [[Category:Documentation see also templates]] }} </noinclude> 1c4315eaad3857aa3fcc7a7bb9d24c989e20e19f Template:Navigation templates 10 923 1837 2023-06-23T20:58:27Z wikipedia>Andrybak 0 categorization wikitext text/x-wiki {| class="wikitable" style="margin-left: auto; margin-right: auto; text-align: center;" |+ Navigation templates comparison {{Navbar|Navigation templates|plain=1|brackets=y}} |- ! Template ! Collapsible !! Header color ! Image !! Groups !! Style (body) <br /> parameter/s |- | style="text-align: left;" | {{tl|Navbox}} | collapsible || style="background: #ccf;" | navbox | Left/right of body || Yes || Yes |- | style="text-align: left;" | {{tl|Navbox with collapsible groups}} | collapsible || style="background: #ccf;" | navbox | Left/right of body and/or in each list || Yes || Yes |- | style="text-align: left;" | {{tl|Navbox with columns}} | collapsible || style="background: #ccf;" | navbox | Left/right of columns || No || Yes |} {| class="wikitable" style="margin-left: auto; margin-right: auto; text-align: center;" |+ Collapsible attributes |- ! Type !! CSS classes !! JavaScript !! Collapses when !! Custom <br /> initial&nbsp;state !! Nesting |- | style="text-align:left;" | [[Help:Collapsing|Collapsible tables]] | mw-collapsible | Defined in [[MediaWiki:Common.js|Common.js]] | 2 or more autocollapse on page || Yes || Yes |}<noinclude> [[Category:Navbox meta-templates|Δ]] [[Category:Documentation shared content templates]] </noinclude> d3db3f22f1995a65f056c5ca452cc441097416ce Template:Ambox/doc 10 975 1951 2023-06-24T19:11:27Z wikipedia>Izno 0 /* TemplateData */ remove collapse wikitext text/x-wiki {{High-use}} {{Documentation subpage}} <!-- Please add categories to the /doc subpage, and interwikis at Wikidata (see Wikipedia:Wikidata) --> {{Lua|Module:Message box}} {{Mbox templates (small)}} {{tl|Ambox}} stands for '''A'''rticle '''m'''essage '''box''', which is a [[Help:Metatemplating|metatemplate]]. It is used to build message boxes for templates used in '''articles''', such as {{tl|underlinked}}. It offers several different colours, images and some other features. ==Basic usage== The box below shows the most common parameters that are accepted by {{Tl|Ambox}}. The purpose of each is described below. <syntaxhighlight lang="wikitext" style="overflow:auto;"> {{Ambox | name = | subst = <includeonly>{{subst:substcheck}}</includeonly> | small = {{{small|}}} | type = | image = | sect = {{{1|}}} | issue = | talk = {{{talk|}}} | fix = | date = {{{date|}}} | cat = | all = }} </syntaxhighlight> ==Full usage== {{Hidden begin |title=Full parameters| titlestyle = background:palegreen;}} The "All parameters" box shows all possible parameters for this template. However, it is not recommended to copy this, because it will never be required to use all parameters simultaneously. {| class="wikitable" align="left" style="background:transparent; width=30%;" !All parameters |- |<syntaxhighlight lang="wikitext" style="font-size:100%"> {{Ambox | name = | subst = <includeonly>{{subst:substcheck}}</includeonly> | small = {{{small|}}} | type = | image = | imageright = | smallimage = | smallimageright = | class = | style = | textstyle = | sect = {{{1|}}} | issue = | talk = {{{talk|}}} | fix = | date = {{{date|}}} | text = | smalltext = | plainlinks = no | removalnotice = | cat = | all = | cat2 = | all2 = | cat3 = | all3 = }} </syntaxhighlight> |} {{Hidden end}} {{clear}} ==Common parameters== === ''name'' === The ''name'' parameter specifies the name of the template, without the Template namespace prefix. For example {{Tl|Underlinked}} specifies {{Para|name|Underlinked}}. This parameter should be updated if the template is ever moved. The purpose of this parameter is twofold: * If incorrectly [[Wikipedia:Substitution|substituted]], it allows the meta-template to notify the name of the template which has been substituted, which may help editors to fix the problem. * It allows the template to have a more useful display on its template page, for example to show the date even when not specified, and to apply categorisation of the template itself. === ''subst'' === The ''subst'' parameter allows the meta-template to detect whether the template has been incorrectly substituted, and give an appropriate warning. It will also add such pages to [[:Category:Pages with incorrectly substituted templates]]. Just copy the code exactly as it appears in the box. === ''small'' === The ''small'' parameter should be passed through the template, as this will allow editors to use the small format by specifying {{para|small|left}} on an article: {{Ambox|nocat=true|small=left|text=This is the small left-aligned Ambox format.}} Otherwise the standard format will be produced: {{Ambox|nocat=true|text=This is the standard Ambox format.}} Other variations: * For templates which should ''never'' be small, specify {{Para|small|no}} or do not pass the small parameter at all. * For templates which should ''always'' be small, just specify {{Para|small|left}}. * For templates which should ''default to small'', try {{para|small|<nowiki>{{{small|left}}}</nowiki>}}. This will allow an editor to override by using {{para|small|no}} on an article. To use a small box that adjusts its width to match the text, use {{para|style|width: auto; margin-right: 0px;}} and {{para|textstyle|width: auto;}} together: {{Ambox|nocat=true|small=left|style=width: auto; margin-right: 0px;|textstyle=width: auto; margin-right: 0px;|text=This is the small left-aligned Ambox format with flexible width.}} See {{section link||sect}} below for more information on how to limit {{para|small}} display to cases when the template is being used for a section instead of the whole article (recommended, to prevent inconsistent top-of-article display). === ''type'' === The ''type'' parameter defines the colour of the left bar, and the image that is used by default. The type is chosen not on aesthetics but is based on the type of issue that the template describes. The seven available types and their default images are shown below. {{Ambox |nocat=true | type = speedy | text = type=<u>speedy</u> – Speedy deletion issues, such as {{tl|db-g1}} and {{tl|db-g3}}. }} {{Ambox |nocat=true | type = delete | text = type=<u>delete</u> – Deletion issues, such as {{tl|article for deletion}} and {{tl|proposed deletion}}. }} {{Ambox |nocat=true | type = content | text = type=<u>content</u> – Content issues, such as {{tl|POV}} and {{tl|globalize}}. }} {{Ambox |nocat=true | type = style | text = type=<u>style</u> – Style issues, such as {{tl|cleanup}} and {{tl|underlinked}}. }} {{ambox |nocat=true | type = notice | text = type=<u>notice</u> – Article notices, such as {{tl|current}} and {{tl|in use}}. }} {{Ambox |nocat=true | type = move | text = type=<u>move</u> – Merge, split and transwiki proposals, such as {{tl|split}} and {{tl|merge}}. }} {{Ambox |nocat=true | type = protection | text = type=<u>protection</u> – Protection notices, such as {{tl|pp-vandalism}} and {{tl|pp-protected}}. }} If no ''type'' parameter is given the template defaults to {{para|type|notice}}. === ''image'' === You can choose a specific image to use for the template by using the ''image'' parameter. Images are specified using the standard syntax for inserting files in Wikipedia (see [[Wikipedia:Manual of Style/Images#How to place an image]].) Widths of 40-50px are typical. For example: * {{Tl|POV}} specifies {{Para|image|<nowiki>[[File:Unbalanced scales.svg|40px|link=|alt=]]</nowiki>}} and looks like this: {{POV|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} * {{tl|underlinked}} specifies {{para|image|<nowiki>[[File:Ambox wikify.svg|50x40px|link=|alt=]]</nowiki>}} and looks like this: {{underlinked|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} Please note: * If no image is specified then the default image corresponding to the ''type'' is used. (See [[#type]] above.) * If {{para|image|none}} is specified, then no image is used and the text uses the whole message box area. * If an icon is [[Wikipedia:Alternative text for images#Purely decorative images|purely decorative]] and also in the [[Wikipedia:Image use policy#Public_domain|public domain]], [[Wikipedia:Manual of Style/Accessibility|accessibility]] can be improved by suppressing the link to the file page by adding "{{para|link}}{{para|alt}}" as seen above. === ''sect'' === Many article message templates begin with the text '''This article ...''' and it is often desirable that this wording change to '''This section ...''' if the template is used on a section instead. The value of this parameter will replace the word "article". Various possibilities for use include: {{para|sect|list}}, {{para|sect|table}}, {{para|sect|"In popular culture" material}}, etc. {{em|If using this feature, be sure to remove the first two words ("This article") from the template's text, otherwise it will be duplicated.}} A common way to facilitate this functionality is to pass {{para|sect|<nowiki>{{{1|}}}</nowiki>}}. This will allow editors to type <kbd>section</kbd>, for example, as the first unnamed parameter of the template to change the wording. For example, {{tlx|Advert|section}} produces: {{Advert|section|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} Another approach is to pass {{para|sect|<nowiki>{{{section|{{{sect|}}}}}}</nowiki>}} to provide a named value. Another is to use {{tlx|Yesno}} to parse the value for a positive, and pass {{para|sect|section}} if true. {{em|These approaches can be combined}}, and this is recommended. The following ready-to-use code: {{block indent|1=<code><nowiki>| sect = {{#ifeq:{{yesno|def=|1={{{sect|{{{section}}}}}} }}|yes|section|{{{sect|{{{section|{{{1|}}}}}}}}} }}</nowiki></code>}} enables the following: * Any positive value that {{tlx|Yesno}} can detect will be used with the named parameter in the ambox-based template to get "section" instead of "article": {{para|section|y}}, {{para|sect|True}}, etc. It is recommended to allow both {{para|sect}} and {{para|section}} so that editors do not have to guess which one will work. The sample code above does this for you. * Any other value passed, in any manner, will replace "article": {{para||section and its subsections}}, {{para|1|list}}, {{para|sect|section}}, {{para|section|table}}, etc. It is also advisable to restrict use of the {{para|small}} parameter so that it is made contingent upon the template being applied to a section (or whatever) rather than the whole article, to prevent the small version of the template being used at the top of the article where it would be inconsistent with other article-wide cleanup/dispute banners: {{block indent|1=<code><nowiki>| small = {{#if:{{{sect|{{{section|{{{1|}}}}}}}}}|{{#if:{{{small|{{{left|}}}}}}|left}} }}</nowiki></code>}} (In this case, any value of {{para|small}} or {{para|left}} will trigger the small, left display, as long as some value of {{para|sect}} or one of its aliases in that template has also been provided.) This code can be copy-pasted and used with the above code block. See, e.g., [[Template:Trivia]] and its [[Template:Trivia/testcases]] to observe the combined functionality. === ''issue'' and ''fix'' === The ''issue'' parameter is used to describe the issue with the article. Try to keep it short and to-the-point (approximately 10-20 words) and be sure to include a link to a relevant [[Wikipedia:Policies and guidelines|policy or guideline]]. The ''fix'' parameter contains some text which describes what should be done to improve the article. It may be longer than the text in ''issue'', but should not usually be more than two sentences. When the template is in its compact form (when placed inside {{tl|multiple issues}}) or small form (when using {{para|small|left}}), the ''issue'' is the only text that will be displayed. For example, {{Tl|Citation style}} defines * <syntaxhighlight lang="text" inline>|issue=This article '''has an unclear citation style'''.</syntaxhighlight> * <syntaxhighlight lang="text" inline>|fix=The references used may be made clearer with a different or consistent style of [[Wikipedia:Citing sources|citation]], [[Wikipedia:Footnotes|footnoting]], or [[Wikipedia:External links|external linking]].</syntaxhighlight> When used stand-alone it produces the whole text: {{Citation style|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} But when used inside {{Tl|Multiple issues}} or with {{Para|small|left}} it displays only the issue: {{Multiple issues <!-- Even though there's only one "issue", please don't remove this {{Multiple issues}} template. It is a demonstration of the formatting. --> |{{Citation style|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}}} {{Citation style|small=left|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} === ''talk'' === Some article message templates include a link to the talk page, and allow an editor to specify a section heading to link directly to the relevant section. To achieve this functionality, simply pass the ''talk'' parameter through, i.e. {{para|talk|<nowiki>{{{talk|}}}</nowiki>}} This parameter may then be used by an editor as follows: * {{para|talk|SECTION HEADING}} – the link will point to the specified section on the article's talk page, e.g. {{para|talk|Foo}} * {{para|talk|FULL PAGE NAME}} – the template will link to the page specified (which may include a [[Help:Link#Section linking (anchors)|section anchor]]), e.g. {{para|talk|Talk:Banana#Foo}} Notes: * When this parameter is used by a template, the talk page link will appear on the template itself (in order to demonstrate the functionality) but this will only display on articles if the parameter is actually defined. * In order to make sure there is always a link to the talk page, you can use {{para|talk|<nowiki>{{{talk|#}}}</nowiki>}}. * If the talk page does not exist, there will be no link, whatever the value of the parameter. === ''date'' === Passing the ''date'' parameter through to the meta-template means that the date that the article is tagged may be specified by an editor (or more commonly a [[Wikipedia:Bots|bot]]). This will be displayed after the message in a smaller font. Passing this parameter also enables [[:Category:Wikipedia maintenance categories sorted by month|monthly cleanup categorisation]] when the ''cat'' parameter is also defined. === ''info'' === This parameter is for specifying additional information. Whatever you add here will appear after the date, and will not be displayed if the template is being wrapped in {{tl|multiple issues}}. === ''removalnotice'' === If you specify {{para|removalnotice|yes}}, then the following notice will be displayed after the date and after the ''info'' text: * <small>[[Help:Maintenance template removal|Learn how and when to remove this template message]].</small> This will not be displayed if the template is being wrapped in {{tl|multiple issues}}. === ''cat'' === This parameter defines a monthly cleanup category. If {{para|cat|CATEGORY}} then: * articles will be placed in '''Category:CATEGORY from DATE''' if {{para|date|DATE}} is specified. * articles will be placed in '''Category:CATEGORY''' if the date is not specified. For example, {{Tl|No footnotes}} specifies {{Para|cat|Articles lacking in-text citations}} and so an article with the template {{Tlx|No footnotes|2=date=June 2010}} will be placed in [[:Category:Articles lacking in-text citations from June 2010]]. The ''cat'' parameter should not be linked, nor should the prefix <code>Category:</code> be used. === ''all'' === The ''all'' parameter defines a category into which all articles should be placed. The ''all'' parameter should not be linked, nor should the prefix <code>Category:</code> be used. == Additional parameters == === ''imageright'' === An image on the right side of the message box may be specified using this parameter. The syntax is the same as for the ''image'' parameter, except that the default is no image. === ''smallimage'' and ''smallimageright'' === Images for the small format box may be specified using these parameters. They will have no effect unless {{para|small|left}} is specified. === ''class'' === Custom [[Cascading Style Sheets|CSS]] classes to apply to the box. If adding multiple classes, they should be space-separated. === ''style'' and ''textstyle'' === Optional CSS values may be defined, without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. * ''style'' specifies the style used by the entire message box table. This can be used to do things such as modifying the width of the box. * ''textstyle'' relates to the text cell. === ''text'' and ''smalltext'' === Instead of specifying the ''issue'' and the ''fix'' it is possible to use the ''text'' parameter instead. Customised text for the small format can be defined using ''smalltext''. === ''plainlinks'' === Normally on Wikipedia, external links have an arrow icon next to them, like this: [http://www.example.com Example.com]. However, in message boxes, the arrow icon is suppressed by default, like this: <span class="plainlinks">[http://www.example.com Example.com]</span>. To get the normal style of external link with the arrow icon, use {{para|plainlinks|no}}. === ''cat2'', ''cat3'', ''all2'', and ''all3'' === * ''cat2'' and ''cat3'' provide for additional monthly categories; see [[#cat]]. * ''all2'' and ''all3'' provide for additional categories into which all articles are placed, just like [[#all]]. == Technical notes == * If you need to use special characters in the text parameter then you need to escape them like this: <syntaxhighlight lang="wikitext"> {{Ambox |nocat=true | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }} </syntaxhighlight> {{Ambox |nocat=true | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }} * The <code>&lt;div></code> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that. * The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons. * For more technical details see the [[Template talk:Ambox|talk page]] and the "See also" links below. Since this template works almost exactly like {{Tl|Tmbox}}, {{Tl|Imbox}}, {{Tl|Cmbox}} and {{Tl|Ombox}} their talk pages and related pages might also contain more details. ==Display on mobile devices== The MediaWiki developers have been conducted ongoing readability studies on ambox on the [https://en.m.wikipedia.org mobile version of Wikipedia]. Until further notice, code installed by the developers on the mobile version will generally override what we do here regarding the display and layout of this template. For more information, see [[:MW:Reading/Web/Projects/Mobile Page Issues]]. == TemplateData == {{TemplateData header|noheader=1}} <templatedata> { "params": { "1": {}, "small": { "label": "Small Mode", "description": "The small parameter should be passed through the template, as this will allow editors to use the small format by specifying |small=left on an article.", "type": "string", "suggestedvalues": [ "no", "left" ] }, "talk": {}, "date": {}, "name": { "label": "Template Name", "description": "The name parameter specifies the name of the template, without the Template namespace prefix. ", "type": "string" }, "type": {}, "image": {}, "sect": {}, "issue": {}, "fix": {}, "subst": {}, "info": {}, "removalnotice": {}, "cat": {}, "all": {}, "imageright": {}, "class": {}, "text ": {}, "plainlinks": {}, "smallimage ": {}, "smallimageright": {}, "textstyle": {}, "style ": {}, "smalltext": {}, "cat2": {}, "cat3": {}, "all2": {}, "all3": {} }, "paramOrder": [ "name", "subst", "small", "type", "image", "sect", "issue", "fix", "talk", "date", "1", "info", "removalnotice", "cat", "all", "imageright", "class", "text ", "plainlinks", "smallimage ", "smallimageright", "textstyle", "style ", "smalltext", "cat2", "cat3", "all2", "all3" ] } </templatedata> == Mbox family == {{Mbox templates see also}} == See also == * [[Wikipedia:Manual of Style/Article message boxes]] – The historical style guideline for creating article message boxes. <includeonly>{{sandbox other|| <!-- Add categories below this line, and interwikis at Wikidata --> [[Category:Article message templates| ]] [[Category:Mbox and messagebox templates]] }}</includeonly> df640bf2f71926dabed521e9dbd8dc495fb33e59 Template:Navbox/doc 10 926 1843 2023-06-30T22:28:28Z wikipedia>SWinxy 0 /* See also */ mention {{navbox documentation}} wikitext text/x-wiki {{for|vertically-aligned navigation|Template:Sidebar}} {{documentation subpage}} {{high-use|all-pages=y}} {{Template display|nomobile}} {{Lua|Module:Navbox}} {{Navbox suite}} {{Lua sidebar}} This template allows a [[Wikipedia:Navigation template|navigational template]] to be set up relatively quickly by supplying it with one or more lists of links. It comes equipped with default styles that should work for most navigational templates. Changing the default styles is possible, but not recommended. Using this template, or one of its "Navbox suite" sister templates, is highly recommended for standardization of navigational templates, and for ease of use. {{Navbox visibility}} == Usage == Please remove the parameters that are left blank. <pre style="overflow: auto;">{{Navbox | name = {{subst:PAGENAME}}{{subst:void|Don't change anything on this line. It will change itself when you save.}} | title = | listclass = hlist | state = {{{state|}}} | above = | image = | group1 = | list1 = | group2 = | list2 = | group3 = | list3 = <!-- ... --> | below = }} </pre> == Parameter list == {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | title = {{{title}}} | above = {{{above}}} | image = {{{image}}} | group1 = {{{group1}}} | list1 = {{{list1}}} | group2 = {{{group2}}} | list2 = {{{list2}}} | group3 = {{{group3}}} | list3 = {{{list3}}} | group4 = {{{group4}}} | list4 = {{{list4}}} | below = {{{below}}} <br /> See alternate navbox formats under: [[#Layout of table|''Layout of table'']] }} The navbox uses lowercase parameter names, as shown in the box (''above''). The required ''name'' and ''title'' will create a one-line box if other parameters are omitted. Notice "group1" (etc.) is optional, as are sections named "above/below". {{clear}} The basic and most common parameters are as follows (see [[#Parameter descriptions|below]] for the full list): : <code>name</code> – the name (Wikipedia location) of the template. : <code>title</code> – text in the title bar, such as: <nowiki>[[Widget stuff]]</nowiki>. : <code>listclass</code> – a CSS class for the list cells, usually <code>hlist</code> for horizontal lists. Alternatively, use bodyclass for the whole box. : <code>state</code> – controls when a navbox is expanded or collapsed. : <code>titlestyle</code> – a CSS style for the title-bar, such as: <code>background: gray;</code> : <code>groupstyle</code> – a CSS style for the group-cells, such as: <code>background: #eee;</code> : <code>above</code> – text to appear above the group/list section (could be a list of overall wikilinks). : <code>image</code> – an optional right-side image, coded as the whole image, such as: <code><nowiki>[[File:</nowiki><var>XX</var><nowiki>.jpg|80px|link=|alt=]]</nowiki></code> :: Note that most of such images don't comply with [[MOS:DECOR]] and should be removed at sight. : <code>imageleft</code> – an optional left-side image (code the same as the "image" parameter). : <code>group<sub>n</sub></code> – the left-side text before list-n (if group-n omitted, list-n extends to the left edge of the box, and defaults to <code>text-align:center</code> styling). : <code>list<sub>n</sub></code> – text listing wikilinks using a [[Help:List|wikilist]] format. : <code>below</code> – optional text to appear below the group/list section. == Parameter descriptions == The following is a complete list of parameters for using {{tl|Navbox}}. In most cases, the only required parameters are <code>name</code>, <code>title</code>, and <code>list1</code>, though [[Template:Navbox/doc#Child navboxes|child navboxes]] do not even require those to be set. {{tl|Navbox}} shares numerous common parameter names with its sister templates, {{tl|Navbox with columns}} and {{tl|Navbox with collapsible groups}}, for consistency and ease of use. Parameters marked with an asterisk (*) are common to all three master templates. === Setup parameters === ; ''name''* : The name of the template, which is needed for the "V&nbsp;• T&nbsp;• E" ("View&nbsp;• Talk&nbsp;• Edit") links to work properly on all pages where the template is used. You can enter <code><nowiki>{{subst:PAGENAME}}</nowiki></code> for this value as a shortcut. The name parameter is only mandatory if a <code>title</code> is specified, and the <code>border</code> parameter is not set, and the <code>navbar</code> parameter is not used to disable the navbar. ; ''state''* <span style="font-weight:normal;">[<code>autocollapse, collapsed, expanded, plain, off</code>]</span> :* Defaults to <code>autocollapse</code>. A navbox with <code>autocollapse</code> will start out collapsed if there are two or more collapsible elements on the same page. Otherwise, the navbox will be expanded. For the technically minded, see [[MediaWiki:Common.js]] (search for "autocollapse"). :* If set to <code>collapsed</code>, the navbox will always start out in a collapsed state. :* If set to <code>expanded</code>, the navbox will always start out in an expanded state. :* If set to <code>plain</code>, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the <small>V&nbsp;• T&nbsp;• E</small> links). :* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden. : To show the box when standalone (non-included) but then auto-hide contents when in an article, put "expanded" inside {{tag|noinclude|p}} tags. This setting will force the box to be visible when standalone (even when followed by other boxes), displaying "[hide]", but then it will auto-collapse the box when stacked inside an article: :: <code><nowiki>| state =&nbsp;</nowiki></code>{{tag|noinclude|content=expanded}} :Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this: :* In your intermediate template, create a parameter also named "state" as a pass-through like this: <pre><nowiki>| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}</nowiki></pre> :* The {{tag|includeonly|o}}<code>|</code> will make the template expanded when viewing the template page by itself. :** Example 1: {{tl|Peso}} with ''autocollapse'' as the default initial state. [[Catalan peseta]] transcludes it and has only one navbox; thus, the peso navbox shows. [[Chilean peso]] has more than two navboxes; thus, the peso navbox collapses. :** Example 2: {{tl|Historical currencies of Hungary}} with ''expanded'' as the default initial state, as such: <pre>| state = {{{state<includeonly>|expanded</includeonly>}}}</pre> All transcluding articles show the content by default, unless there is a hypothetical article that specifies <code><nowiki>{{templatename|state=collapsed}}</nowiki></code> when transcluding. :** Example 3: {{tl|Tourism}} with ''collapsed'' as the default initial state, as such: <pre>| state = {{{state<includeonly>|collapsed</includeonly>}}}</pre> All transcluding articles will show the template as collapsed by default, but the template will still be uncollapsed when displayed on its own page. :* The template {{tl|Collapsible option}} explains how to use the <code>state</code> parameter. It can be added to a {{tag|noinclude|p}} section after the template definition or to the instructions on the {{tl|documentation subpage}}. ; ''navbar''* : If set to <code>plain</code>, the <span style="font-size: 88%;">V&nbsp;• T&nbsp;• E</span> links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Use <code>off</code> to remove the <span style="font-size: 88%;">V&nbsp;• T&nbsp;• E</span> links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). It is highly recommended that one not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages. ; ''border''* : ''See later section on [[#Child navboxes|using navboxes within one another]] for examples and a more complete description.'' If set to <code>child</code> or <code>subgroup</code>, then the navbox can be used as a borderless child that fits snugly in another navbox. The border is hidden and there is no padding on the sides of the table, so it fits into the ''list'' area of its parent navbox. If set to <code>none</code>, then the border is hidden and padding is removed, and the navbox may be used as a child of another container (do not use the <code>none</code> option inside of another navbox; similarly, only use the <code>child</code>/<code>subgroup</code> option inside of another navbox). If set to anything else (default), then a regular navbox is displayed with a 1px border. An alternate way to specify the border to be a subgroup style is like this (i.e. use the first unnamed parameter instead of the named ''border'' parameter): :<pre>{{Navbox|child|...}}</pre> === Cells === ; ''title''* : Text that appears centered in the top row of the table. It is usually the template's topic, i.e. a succinct description of the body contents. This should be a single line, but if a second line is needed, use <code><nowiki>{{-}}</nowiki></code> to ensure proper centering. This parameter is technically not mandatory, but using {{tl|Navbox}} is rather pointless without a title. ; ''above''* : A full-width cell displayed between the titlebar and first group/list, i.e. ''above'' the template's body (groups, lists and image). In a template without an image, ''above'' behaves in the same way as the ''list1'' parameter without the ''group1'' parameter. ; ''group<sub>n</sub>''* : (i.e. ''group1'', ''group2'', etc.) If specified, text appears in a header cell displayed to the left of ''list<sub>n</sub>''. If omitted, ''list<sub>n</sub>'' uses the full width of the table. ; ''list<sub>n</sub>''* : (i.e. ''list1'', ''list2'', etc.) The body of the template, usually a list of links. Format is inline, although the text can be entered on separate lines if the entire list is enclosed within <code><nowiki><div> </div></nowiki></code>. At least one ''list'' parameter is required; each additional ''list'' is displayed in a separate row of the table. Each ''list<sub>n</sub>'' may be preceded by a corresponding ''group<sub>n</sub>'' parameter, if provided (see below). :Entries should be separated using a [[newline]] and an [[asterisk]] (*). If instead two asterisks are used, it provides [[Nesting (computing)|nesting]] within the previous entry by enclosing the entry with brackets. Increasing the number of asterisks used increases the number of brackets around entries. ; ''image''* : An image to be displayed in a cell below the title and to the right of the body (the groups/lists). For the image to display properly, the ''list1'' parameter must be specified. The ''image'' parameter accepts standard wikicode for displaying an image, ''e.g.'': <pre>[[File:</nowiki><var>XX</var><nowiki>.jpg|80px|link=|alt=]]</pre> nb: including "|right" will produce the usual left margin to provide separation from the list items and [[Zebra striping (computer graphics)|zebra striping]]. :Note that most of such images don't comply with [[MOS:DECOR]] and should be removed at sight. A rare example of a correct usage would be [[special:permalink/995622594|this one]]: a map shows (in green) the location of a region within the state of Kazakhstan, and this is consistently implemented for [[:category:Kazakhstan region templates|all state's regions]]. ; ''imageleft''* : An image to be displayed in a cell below the title and to the left of the body (lists). For the image to display properly, the ''list1'' parameter must be specified and no groups can be specified. It accepts the same sort of parameter that ''image'' accepts. ; ''below''* : A full-width cell displayed ''below'' the template's body (groups, lists and image). In a template without an image, ''below'' behaves in the same way as the template's final ''list<sub>n</sub>'' parameter without a ''group<sub>n</sub>'' parameter. For an example of the ''below'' parameter in use, see {{oldid|Main Page|352612160|this}} version of {{tl|Lists of the provinces and territories of Canada}}. {{tl|icon}} is often used for non-article links, for example <code><nowiki>{{icon|category}} [[:Category:</nowiki>''name''<nowiki>|Category]]</nowiki></code>. === Style parameters === Styles are generally advised against, to maintain consistency among templates and pages in Wikipedia; but the option to modify styles is given. ; ''bodystyle''* : Specifies [[Cascading Style Sheets|CSS]] styles to apply to the template body. This option should be used sparingly as it can lead to visual inconsistencies. Examples: :* <code>bodystyle = background: #''nnnnnn'';</code> :* <code>bodystyle = width: ''N''&nbsp;[em/%/px or width: auto];</code> :* <code>bodystyle = float: [''left/right/none''];</code> :* <code>bodystyle = clear: [''right/left/both/none''];</code> ; ''basestyle''* : CSS styles to apply to the ''title'', ''above'', ''below'', and ''group'' cells all at once. The styles are not applied to ''list'' cells. This is convenient for easily changing the basic color of the navbox without having to repeat the style specifications for the different parts of the navbox. Example: <code>basestyle = background: lightskyblue;</code> ; ''titlestyle''* : [[Cascading Style Sheets|CSS]] styles to apply to ''title'', most often the titlebar's background color: :* <code>titlestyle = background: ''#nnnnnn'';</code> :* <code>titlestyle = background: ''name'';</code> :* <code>titlestyle = background: none;</code> — for no background color ; ''groupstyle''* : CSS styles to apply to the ''groupN'' cells. This option overrides any styles that are applied to the entire table. Examples: :* <code>groupstyle = background: #''nnnnnn'';</code> :* <code>groupstyle = text-align: [''left/center/right''];</code> :* <code>groupstyle = vertical-align: [''top/middle/bottom''];</code> ; ''group<sub>n</sub>style''* : CSS styles to apply to a specific group, in addition to any styles specified by the ''groupstyle'' parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Example: <code>group3style = background: red; color: white;</code> ; ''groupwidth'' : A number and unit specifying a uniform width for the group cells, in cases where little content in the list cells may cause group cells to be too wide. No default. However, may be overridden by the ''group(n)style'' parameter. Example: <code>groupwidth = 9em</code> ; ''liststyle''* : CSS styles to apply to all lists. Overruled by the ''oddstyle'' and ''evenstyle'' parameters (if specified) hereafter. When using backgound colors in the navbox, see the [[#Intricacies|note hereafter]]. ; ''list<sub>n</sub>style''* : CSS styles to apply to a specific list, in addition to any styles specified by the ''liststyle'' parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Example: <code>list5style = background: #ddddff;</code> ; ''listpadding''* : A number and unit specifying the padding in each ''list'' cell. The ''list'' cells come equipped with a default padding of 0.25em on the left and right, and 0 on the top and bottom. Due to complex technical reasons, simply setting "liststyle = padding: 0.5em;" (or any other padding setting) will not work. Examples: :* <code>listpadding = 0.5em 0;</code> (sets 0.5em padding for the top/bottom, and 0 padding for the left/right.) :* <code>listpadding = 0;</code> (removes all list padding.) ; ''oddstyle'' ; ''evenstyle'' : Applies to odd/even list numbers. Overrules styles defined by ''liststyle''. The default behavior is to add striped colors (white and gray) to odd/even rows, respectively, in order to improve readability. These should not be changed except in extraordinary circumstances. ; ''evenodd'' <span style="font-weight: normal;"><code>[swap, even, odd, off]</code></span> : If set to <code>swap</code>, then the automatic striping of even and odd rows is reversed. Normally, even rows get a light gray background for striping; when this parameter is used, the odd rows receive the gray striping instead of the even rows. Setting to <code>even</code> or <code>odd</code> sets all rows to have that striping color. Setting to <code>off</code> disables automatic row striping. ; ''abovestyle''* ; ''belowstyle''* : CSS styles to apply to the top cell (specified via the ''above'' parameter) and bottom cell (specified via the ''below'' parameter). Typically used to set background color or text alignment: :* <code>abovestyle = background: #''nnnnnn'';</code> :* <code>abovestyle = text-align: [''left/center/right''];</code> :* <code>belowstyle = background: #''nnnnnn'';</code> :* <code>belowstyle = text-align: [''left/center/right''];</code> ; ''imagestyle''* ; ''imageleftstyle''* : CSS styles to apply to the cells where the image/imageleft sits. These styles should only be used in exceptional circumstances, usually to fix width problems if the width of groups is set and the width of the image cell grows too large. Example: <code>imagestyle = width:5em;</code> ===== Default styles ===== The style settings listed here are those that editors using the navbox change most often. The other more complex style settings were left out of this list to keep it simple. Most styles are set in [[MediaWiki:Common.css]]. <syntaxhighlight lang="css"> bodystyle = background: #fdfdfd; width: 100%; vertical-align: middle; titlestyle = background: #ccccff; padding-left: 1em; padding-right: 1em; text-align: center; abovestyle = background: #ddddff; padding-left: 1em; padding-right: 1em; text-align: center; belowstyle = background: #ddddff; padding-left: 1em; padding-right: 1em; text-align: center; groupstyle = background: #ddddff; padding-left: 1em; padding-right: 1em; text-align: right; liststyle = background: transparent; text-align: left/center; oddstyle = background: transparent; evenstyle = background: #f7f7f7; </syntaxhighlight> Since ''liststyle'' and ''oddstyle'' are transparent, odd lists have the color of the ''bodystyle'', which defaults to #fdfdfd (white with a hint of gray). A list defaults to <code>text-align: left;</code> if it has a group, if not it defaults to <code>text-align: center;</code>. Since only ''bodystyle'' has a vertical-align all the others inherit its <code>vertical-align: middle;</code>. === Advanced parameters === ; ''bodyclass'' ; ''aboveclass'' ; ''groupclass'' ; ''listclass'' ; ''belowclass'' : This enables attaching a CSS class to group or list cells. The most common use for ''listclass'' is to give it the <code>hlist</code> class that will cause lists to render horizontally. All these parameters accept the <code>hlist</code> class, but if more than one parameter is used for <code>hlist</code>, use {{para|bodyclass|hlist}} instead. ; ''innerstyle'' : A very advanced parameter to be used ''only'' for advanced meta-templates employing the navbox. Internally, the navbox uses an outer table to draw the border, and then an inner table for everything else (title/above/groups/lists/below/images, etc.). The ''style''/''bodystyle'' parameter sets the style for the outer table, which the inner table inherits, but in advanced cases (meta-templates) it may be necessary to directly set the style for the inner table. This parameter provides access to that inner table so styles can be applied. Use at your own risk. ; ''nowrapitems'' : Setting <code>|nowrapitems=yes</code> applies nowrap to each line in a list item, and to any <code>above</code> or <code>below</code> item. ; ''orphan'' : Setting <code>|orphan=yes</code> in a child navbox fixes odd/even striping and removes [[:Category:Navbox orphans]]. ==== Microformats ==== ; ''bodyclass'' : This parameter is inserted into the "class" attribute for the navbox as a whole. ; ''titleclass'' : This parameter is inserted into the "class" attribute for the navbox's title caption. This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a navbox as containing [[hCard]] information about a person, for example, add the following parameter: <pre> | bodyclass = vcard </pre> ''and'' <pre> | titleclass = fn </pre> ''or'' (for example): <pre><nowiki> | title = The books of <span class="fn">[[Iain Banks]]</span> </nowiki></pre> ...and so forth. See [[Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia, and [[microformat]] for more information on microformats in general. == Layout of table == ===Without image, above and below=== Table generated by {{tl|Navbox}} '''without''' ''image'', ''above'' and ''below'' parameters (gray list background color added for illustration only): {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | liststyle = background: silver; | title = {{{title}}} | group1 = {{{group1}}} | list1 = {{{list1}}} | group2 = {{{group2}}} | list2 = {{{list2}}} | list3 = {{{list3}}} ''without {{{group3}}}'' | group4 = {{{group4}}} | list4 = {{{list4}}} }} ===With image, above and below=== Table generated by {{tl|Navbox}} '''with''' ''image'', ''above'' and ''below'' parameters (gray list background color added for illustration only): {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | liststyle = background: silver; | image = {{{image}}} | title = {{{title}}} | above = {{{above}}} | group1 = {{{group1}}} | list1 = {{{list1}}} | group2 = {{{group2}}} | list2 = {{{list2}}} | list3 = {{{list3}}} ''without {{{group3}}}'' | group4 = {{{group4}}} | list4 = {{{list4}}} | below = {{{below}}} }} ===With image and without groups=== Table generated by {{tl|Navbox}} '''with''' ''image'', ''imageleft'', ''lists'', and '''without''' ''groups'', ''above'', ''below'' (gray list background color added for illustration only): {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | liststyle = background: silver; | image = {{{image}}} | imageleft = {{{imageleft}}} | title = {{{title}}} | list1 = {{{list1}}} | list2 = {{{list2}}} | list3 = {{{list3}}} | list4 = {{{list4}}} }} == Examples == <!-- Please do not encourage folks to use <div> within Navboxes as (unless handled carefully) they can negate liststyles/groupstyles/etc. settings. --> === No image === <syntaxhighlight lang="wikitext" style="overflow: auto;"> {{Navbox | name = Navbox/doc | title = [[MSC Malaysia]] | listclass = hlist | group1 = Centre | list1 = * [[Cyberjaya]] | group2 = Area | list2 = * [[Klang Valley]] | group3 = Major landmarks | list3 = * [[Petronas Twin Towers]] * [[Kuala Lumpur Tower]] * [[Kuala Lumpur Sentral]] * [[Technology Park Malaysia]] * [[Putrajaya]] * [[Cyberjaya]] * [[Kuala Lumpur International Airport]] | group4 = Infrastructure | list4 = * [[Express Rail Link]] * [[KL-KLIA Dedicated Expressway]] | group5 = Prime applications | list5 = * [[E-Government]] * [[MyKad]] }} </syntaxhighlight> {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | title = [[MSC Malaysia]] | listclass = hlist | group1 = Centre | list1 = * [[Cyberjaya]] | group2 = Area | list2 = * [[Klang Valley]] | group3 = Major landmarks | list3 = * [[Petronas Twin Towers]] * [[Kuala Lumpur Tower]] * [[Kuala Lumpur Sentral]] * [[Technology Park Malaysia]] * [[Putrajaya]] * [[Cyberjaya]] * [[Kuala Lumpur International Airport]] | group4 = Infrastructure | list4 = * [[Express Rail Link]] * [[KL-KLIA Dedicated Expressway]] | group5 = Prime applications | list5 = * [[E-Government]] * [[MyKad]] }} == Child navboxes == {{Selfref|For additional examples, see the [[Template:Navbox/testcases|Navbox testcases page]].}} It is possible to place multiple navboxes within a single border by using "child" as the first parameter, or by setting the ''border'' parameter. The basic code for doing this is as follows (which adds a subgroup for the first group/list area): <pre style="overflow: auto;"> {{Navbox | name = {{subst:PAGENAME}} | title = Title | group1 = [optional] | list1 = {{Navbox|child ...child navbox parameters... }} ... }} </pre> === Subgroups example === This example shows two subgroups created using <code>child</code> as the first unnamed parameter. The striping is alternated automatically. To remove the striping altogether, you can set <code>liststyle = background:transparent;</code> in each of the navboxes. {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | title = Multiple subgroup example | above = Above | below = Below | group1 = Group1 | list1 = List1 | group2 = Group2 | list2 = {{{{PAGENAMETDOC}}|child | group1 = Group2.1 | list1 = List1 | group2 = Group2.2 | list2 = List2 | group3 = Group2.3 | list3 = List3 }} | group3 = Group3 | list3 = List3 | group4 = Group4 | list4 = {{{{PAGENAMETDOC}}|child | group1 = Group4.1 | list1 = List1 | group2 = Group4.2 | list2 = List2 | group3 = Group4.3 | list3 = List3 }} }} === Multiple show/hides in a single container === {{main|Template:Navbox with collapsible groups}} The example below is generated using a regular navbox for the main container, then its list1, list2, and list3 parameters each contain another navbox, with <code>1 = child</code> set. The view (v), talk (t), edit (e) navbar links are hidden using <code>navbar = plain</code> for each of them, or could be suppressed by just leaving out the ''name'' parameter (child navboxes do not require the name parameter to be set, unlike regular navboxes). {{{{PAGENAMETDOC}} | name = Navbox/doc | title = [[French colonial empire|Former French overseas empire]] | state = uncollapsed | list1 = {{{{PAGENAMETDOC}}|child | navbar = plain | title = [[French colonial empire|Former French colonies]] in [[Africa]] and the [[Indian Ocean]] | listclass = hlist | group1 = [[Mahgreb]] | list1 = * [[French rule in Algeria|Algeria]] * [[French Morocco|Morocco]] <small>([[Arguin|Arguin Island]])</small> * [[History of Tunisia|Tunisia]] | group2 = [[French West Africa]] | list2 = * [[History of Côte d'Ivoire#French Period|Côte d'Ivoire]] * [[French Dahomey|Dahomey]] * [[French Sudan]] * [[French Guinea|Guinea]] * [[History of Mauritania#French colonization and post-colonial history|Mauritania]] * [[History of Niger#Colonization|Niger]] * [[History of Senegal|Senegal]] * [[French Upper Volta|Upper Volta]] * [[French Togoland]] * [[James Island (The Gambia)|James Island]] | group3 = [[French Equatorial Africa]] | list3 = * [[Colonial Chad|Chad]] * [[History of Gabon|Gabon]] * [[History of the Republic of the Congo|Middle Congo]] * [[Oubangui-Chari]] | group4 = [[Comoros]] | list4 = * [[Anjouan]] * [[Grande Comore]] * [[Mohéli]] * [[History of Djibouti#French Interest|French Somaliland (Djibouti)]] * [[History of Madagascar#French control|Madagascar]] * [[Mauritius|Ile de France]] * [[Seychelles]] }} | list2 = {{{{PAGENAMETDOC}}|child | navbar = plain | title = [[French colonial empire|Former French colonies]] in the [[Americas]] | listclass = hlist | list1 = * [[New France]]{{spaces|2}}<small>([[Acadia]], [[Louisiana (New France)|Louisiana]], [[Canada, New France|Canada]], [[Newfoundland (island)|Terre Neuve]]) 1655–1763 </small> | list2 = * [[Inini]] * [[Berbice]] * [[Saint-Domingue]] * <small>[[Haiti]]</small> * [[Tobago]] * [[History of the British Virgin Islands|Virgin Islands]] * [[France Antarctique]] * [[France Équinoxiale]] | below = [[French West India Company]] }} | list3 = {{{{PAGENAMETDOC}}|child | navbar = plain | title = [[French colonial empire|Former French colonies]] in [[Asia]] and [[Oceania]] | listclass = hlist | group1 = [[French India]] | list1 = * [[Chandernagor]] * [[Coromandel Coast]] * [[History of Chennai|Madras]] * [[Mahé, India|Mahé]] * [[History of Pondicherry|Pondichéry]] * [[Karaikal]] * [[Yanam (India)|Yanaon]] | group2 = [[French Indochina]] | list2 = * [[Colonial Cambodia|Cambodia]] * [[History of Laos to 1945#French Laos|Laos]] * [[French Indochina|Vietnam]] <small>([[Annam (French colony)|Annam]], [[Cochinchina]], [[Tonkin]])</small> | group3 = Other Asian | list3 = * [[Alawite State|Alaouites]] * [[Republic of Hatay|Alexandretta-Hatay]] * [[Sri Lanka|Ceylon]] * [[Kwangchowan]] | group4 = [[Oceania]] | list4 = * [[New Hebrides]] ** [[History of Vanuatu|Vanuatu]] | below = [[French East India Company]] }} }} == Relationship with other Navbox templates == This navbox template works in conjunction with two other templates: {{tl|Navbox with columns}} and {{tl|Navbox with collapsible groups}}. All three of these templates share common parameters for consistency and ease of use (such parameters are marked with an asterisk (*) in the [[#Parameter descriptions|parameter descriptions]] list hereinbefore). Most importantly, each template can be used as a child of one another (by using the {{para|border|child}} parameter, or by specifying the first unnamed parameter to be <code>child</code>. For example: <code><nowiki>{{Navbox|child ...}}</nowiki></code>, <code><nowiki>{{Navbox with columns|child ...}}</nowiki></code> or <code><nowiki>{{Navbox with collapsible groups|child ...}}</nowiki></code>.) == Technical details == * The {{navbar|1=:{{FULLPAGENAME}}|mini=on}} links are produced by [[Template:Navbar]]. If you have a question about them, it is probably best to ask at [[Template talk:Navbar]]. * The 2px wide border between groups and lists is drawn using the border-left property of the list cell. Thus, if you wish to change the background color of the template (for example <code>bodystyle = background:purple;</code>), then you'll need to make the border-left-color match the background color (i.e. <code>liststyle = border-left-color: purple;</code>). If you wish to have a border around each list cell, then the 2px border between the list cells and group cells will disappear; you'll have to come up with your own solution. * Adjacent navboxes have only a 1 pixel border between them. If you set the top or bottom margin of <code>style/bodystyle</code>, then this will not work. * The default margin-left and margin-right of the outer navbox table are set to "auto;". If you wish to use navbox as a float, you need to manually set the margin-left and margin-right values, because the auto margins interfere with the float option. For example, add the following code to use the navbox as a float: ** <code>bodystyle = width: 22em; float: right; margin-left: 1em; margin-right: 0;</code> === Copying to other projects or wikis === If you are trying to copy {{tlf|Navbox}} to your local wiki, there are several other things that must be installed or copied over as well: * The [[mw:Extension:Scribunto|Scribunto]] and [[:mw:Extension:TemplateStyles|TemplateStyles]] extensions must be installed. * [[Module:Navbox]] and its module and TemplateStyles dependencies, listed in the above two links * Optionally, the <code>Add support to mw-collapsible for autocollapse, innercollapse and outercollapse</code> script from [[MediaWiki:Common.js]] may be copied, if autocollapsing is desired. == TemplateData == {{TemplateDataHeader}} <templatedata> { "params": { "state": { "label": "State", "description": "Controls when a navbox is expanded or collapsed", "example": "autocollapse", "suggestedvalues": [ "autocollapse", "collapsed", "expanded", "plain", "off" ], "default": "autocollapse", "suggested": true }, "title": { "label": "Title", "description": "Text in the title bar; centered in the top row of the table. Usually the template's topic.", "example": "[[Widget stuff]]", "suggested": true }, "above": { "label": "Above", "description": "Full-width cell displayed between the titlebar and first group/list, i.e. above the template's body (groups, lists and image)", "type": "string", "suggested": true }, "image": { "label": "Image", "description": "Image to be displayed in a cell below the title and to the right of the body", "example": "[[File:XX.jpg | 80px | link= | alt= ]]", "type": "wiki-file-name", "suggested": true }, "group1": { "label": "Group 1", "description": "If specified, text appears in a header cell displayed to the left of list 1. If omitted, list 1 uses the full width of the table.", "suggested": true }, "list1": { "label": "List 1", "description": "Body of the template; usually a list of links. Format is inline. At least one list parameter is required; each additional list is displayed in a separate row of the table. Each listn may be preceded by a corresponding groupn parameter.\nEntries should be separated using a newline and an asterisk. If two asterisks are used, it provides nesting within the previous entry with brackets.", "required": true, "suggested": true }, "group2": { "suggested": true }, "list2": { "suggested": true }, "list3": { "suggested": true }, "group3": { "suggested": true }, "group4": {}, "list4": {}, "below": { "label": "Below", "description": "Full-width cell displayed below the template's body.", "suggested": true }, "imageleft": { "label": "Image left", "description": "Image to be displayed in a cell below the title and to the left of the body. For the image to display properly, list1 parameter must be specified and no groups can be specified.", "example": "[[File:XX.jpg | 80px | link= | alt= ]]", "type": "wiki-file-name" }, "name": { "label": "Name", "description": "The name of the template. Needed for \"View • Talk • Edit\" links to work properly.", "type": "string", "default": "{{subst:PAGENAME}}{{subst:void|Don't change anything on this line. It will change itself when you save.}}", "suggested": true }, "listclass": { "label": "List class", "description": "CSS class for the list cells, usually hlist for horizontal lists. Alternatively, use bodyclass for the whole box.", "example": "hlist", "type": "string" }, "navbar": { "label": "Navbar status", "example": "plain, off", "type": "string" }, "border": { "label": "Border status", "example": "child, subgroup, none", "type": "string" }, "bodystyle": {}, "basestyle": {}, "titlestyle": {}, "groupstyle": {}, "group1style": {}, "groupwidth": {}, "liststyle": {}, "list1style": {}, "listpadding": {}, "oddstyle": {}, "evenstyle": {}, "evenodd": { "suggestedvalues": [ "swap", "even", "odd", "off" ] }, "abovestyle": {}, "belowstyle": {}, "imagestyle": {}, "imageleftstyle": {} }, "description": "Creates a navigational box for links to other pages. \nDoes not display in mobile.", "paramOrder": [ "name", "title", "group1", "list1", "listclass", "state", "above", "below", "image", "group2", "list2", "group3", "list3", "group4", "list4", "imageleft", "navbar", "border", "bodystyle", "basestyle", "titlestyle", "groupstyle", "liststyle", "group1style", "list1style", "groupwidth", "listpadding", "oddstyle", "evenstyle", "evenodd", "abovestyle", "belowstyle", "imagestyle", "imageleftstyle" ] } </templatedata> == See also == * {{tl|Navboxes}} — groups several navigation boxes together. * {{tl|Nobold}} — To display text at normal font-weight within a context where the default font-weight is bold, e.g. header cells in tables. * {{tl|Sidebar}} — Vertically-aligned navigation templates. * {{tl|Navbox documentation}} — Shows the standard documentation using {{tl|Documentation}}. * [[Template:Navbox/testcases]] — For additional examples of template code. * [[Wikipedia:Line-break handling]] — The how-to guide about how to handle word wraps (line breaks) on Wikipedia, such as the wrapping of the link lists used in navboxes. * [[Wikipedia:Template documentation]] — Guideline to creating the accompanying documentation * {{tl|Nowrap begin}}, {{tl|·}} and {{tl|•}} are '''deprecated''' in favor of the <code>hlist</code> class for formatting lists. See [[Template:Flatlist#Technical details|Flatlist]] for a technical explanation of how <code>hlist</code> works. === Tracking categories === * {{clc|Navbox orphans}} * {{clc|Navigational boxes without horizontal lists}} * {{clc|Navboxes using background colours}} * {{clc|Potentially illegible navboxes}} * {{clc|Navboxes using borders}} {{Navigation templates}} <includeonly>{{sandbox other|| <!-- Add categories below this line, and interwikis at Wikidata --> [[Category:Navbox meta-templates| ]] [[Category:Templates generating microformats]] [[Category:Templates that are not mobile friendly]] [[Category:Collapse templates]] }}</includeonly> 9e90e22fb30660a9f5ff9794e7db044743e4c14d Module:Transclusion count/data/A 828 974 1949 2023-07-09T05:10:06Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["A-Class"] = 5800, ["AARTalk"] = 8900, ["ACArt"] = 5300, ["AFB_game_box_end"] = 2400, ["AFB_game_box_start"] = 2500, ["AFC_comment"] = 14000, ["AFC_submission"] = 25000, ["AFC_submission_category_header"] = 4600, ["AFD_help"] = 103000, ["AFD_help/styles.css"] = 103000, ["AFI/Picture_box/show_picture"] = 3600, ["AFI_film"] = 7900, ["AFL_Car"] = 2600, ["AFL_Col"] = 2400, ["AFL_Ess"] = 2500, ["AFL_Gee"] = 2500, ["AFL_Haw"] = 2300, ["AFL_Mel"] = 2700, ["AFL_NM"] = 2200, ["AFL_Ric"] = 2400, ["AFL_StK"] = 2900, ["AFL_Tables"] = 11000, ["AFL_Year"] = 2500, ["ALG"] = 2400, ["AMARB"] = 4500, ["AML"] = 4500, ["AMQ"] = 4600, ["AM_station_data"] = 4400, ["ARG"] = 6300, ["ASIN"] = 4500, ["ASN"] = 3400, ["ATP"] = 5000, ["AUS"] = 14000, ["AUT"] = 9400, ["AZE"] = 2500, ["A_note"] = 4200, ["A_or_an"] = 29000, ["Aan"] = 45000, ["Abbr"] = 783000, ["Abbreviation"] = 2300, ["Abbrlink"] = 17000, ["Abot"] = 10000, ["About"] = 151000, ["Absolute_page_title"] = 2400, ["Acad"] = 6400, ["Access_icon"] = 2600, ["According_to_whom"] = 4200, ["AchievementTable"] = 10000, ["Active_politician"] = 20000, ["AdSenseSummary"] = 4100, ["Added"] = 2400, ["Adjacent_communities"] = 26000, ["Adjacent_stations"] = 38000, ["Adjacent_stations/styles.css"] = 38000, ["Adjstn"] = 2000, ["Admin"] = 13000, ["Administrator_note"] = 6500, ["Adminnote"] = 3500, ["Advert"] = 19000, ["Aet"] = 5000, ["AfC_age_category"] = 4100, ["AfC_comment"] = 14000, ["AfC_date_category"] = 189000, ["AfC_status/age"] = 4100, ["AfC_status/backlog"] = 4700, ["AfC_submission"] = 39000, ["AfC_submission/comments"] = 24000, ["AfC_submission/declined"] = 24000, ["AfC_submission/declinedivbox"] = 24000, ["AfC_submission/draft"] = 18000, ["AfC_submission/helptools"] = 42000, ["AfC_submission/pending"] = 4100, ["AfC_submission/tools"] = 4100, ["AfC_submission_category_header"] = 5600, ["AfC_submission_category_header/day"] = 5400, ["AfC_submission_category_header/td"] = 5400, ["AfC_talk/C_percentage"] = 3000, ["AfC_topic"] = 26000, ["AfD_categories_horizontal_shortnames"] = 4300, ["AfD_count_link"] = 3800, ["Afd-merged-from"] = 7800, ["AfricaProject"] = 28000, ["Africa_topic"] = 6200, ["After_extra_time"] = 5000, ["Age"] = 37000, ["Age_in_days"] = 4300, ["Age_in_years"] = 3700, ["Age_in_years,_months,_weeks_and_days"] = 4000, ["Age_in_years,_months_and_days"] = 17000, ["Age_in_years_and_days"] = 3900, ["Age_in_years_and_days_nts"] = 3000, ["Agree"] = 2100, ["Ahnentafel"] = 8300, ["Ahnentafel/styles.css"] = 8300, ["Air_Force_Historical_Research_Agency"] = 4300, ["Air_force"] = 5900, ["Air_force/core"] = 5900, ["Aircontent"] = 9400, ["Aircraft_specs"] = 12000, ["Aircraft_specs/convert"] = 12000, ["Aircraft_specs/eng"] = 12000, ["Aircraft_specs/length"] = 12000, ["Aircraft_specs/range"] = 12000, ["Aircraft_specs/speed"] = 12000, ["Airport-dest-list"] = 3600, ["Airport_codes"] = 15000, ["Airport_destination_list"] = 4900, ["Al"] = 64000, ["Album"] = 202000, ["Album_chart"] = 29000, ["Album_chart/chartnote"] = 29000, ["Album_cover_fur"] = 53000, ["Album_label_category"] = 2200, ["Album_label_category/core"] = 2200, ["Album_ratings"] = 77000, ["Album_reviews"] = 5700, ["Albums"] = 7300, ["Albums_category"] = 24000, ["Albums_category/core"] = 24000, ["Albums_category/type/default"] = 24000, ["Align"] = 170000, ["Aligned_table"] = 13000, ["AllIrelandByCountyCatNav"] = 3100, ["AllMovie_name"] = 5700, ["AllMovie_title"] = 28000, ["AllMusic"] = 77000, ["Allcaps"] = 8800, ["Allcaps/styles.css"] = 8800, ["Allmovie"] = 4300, ["Allmovie_title"] = 2300, ["Allmusic"] = 17000, ["Allow_wrap"] = 19000, ["Alumni"] = 2300, ["Always_substitute"] = 8000, ["Ambox"] = 1460000, ["Ambox_globe"] = 35000, ["Ambox_globe_current_red"] = 33000, ["American_English"] = 17000, ["American_football_roster/Footer"] = 3100, ["American_football_roster/Header"] = 3100, ["American_football_roster/Player"] = 3100, ["Americanfootballbox"] = 3100, ["Amg_movie"] = 12000, ["Amg_name"] = 3200, ["Anarchism_announcements"] = 3100, ["Anarchism_announcements/shell"] = 3100, ["Anchor"] = 76000, ["Angbr"] = 2000, ["Angbr_IPA"] = 2300, ["Angle_bracket"] = 3100, ["Anglican_navbox_titlestyle"] = 14000, ["Anglicise_rank"] = 565000, ["Animal_tasks"] = 18000, ["Anime_News_Network"] = 11000, ["Ann"] = 4900, ["Annotated_link"] = 7300, ["Annual_readership"] = 51000, ["Anonblock"] = 32000, ["Antonym_of_(dis)establish"] = 8700, ["Apostrophe"] = 75000, ["ArbCom_Arab-Israeli_editnotice"] = 2100, ["ArbCom_Arab-Israeli_enforcement"] = 3000, ["Arbitration_Committee_candidate/data"] = 76000, ["Archive"] = 154000, ["Archive-nav"] = 5800, ["Archive_bottom"] = 44000, ["Archive_box"] = 18000, ["Archive_list"] = 69000, ["Archive_navigation"] = 7400, ["Archive_top"] = 26000, ["Archive_top/styles.css"] = 26000, ["Archivebottom"] = 3600, ["Archivebox"] = 2500, ["Archives"] = 49000, ["Archivetop"] = 3600, ["Army"] = 15000, ["Army/core"] = 15000, ["Art_UK_bio"] = 2400, ["Art_UK_bio/plural"] = 2400, ["Article"] = 2900, ["ArticleHistory"] = 29000, ["Article_alerts_box"] = 3600, ["Article_alerts_box/styles.css"] = 3600, ["Article_for_improvement_banner/Picture_box"] = 3700, ["Article_for_improvement_banner/Picture_box/show_picture"] = 3600, ["Article_history"] = 47000, ["Articles_by_Quality"] = 2300, ["Articles_by_Quality/down"] = 2300, ["Articles_by_Quality/total"] = 2300, ["Articles_by_Quality/up"] = 2300, ["As_of"] = 78000, ["Asbox"] = 2390000, ["Asbox/styles.css"] = 2390000, ["Asia_topic"] = 9900, ["Asof"] = 7600, ["Assessed-Class"] = 18000, ["Assignment"] = 6100, ["Assignment_milestones"] = 5400, ["AstDys"] = 2900, ["Asterisk"] = 2100, ["AthAbbr"] = 4100, ["Atnhead"] = 6000, ["Atop"] = 4500, ["Attached_KML"] = 13000, ["Au"] = 2100, ["AuEduNewbie"] = 2500, ["Audio"] = 27000, ["Audio_sample"] = 2900, ["AustralianFootball"] = 7400, ["Australian_Dictionary_of_Biography"] = 2400, ["Australian_English"] = 2700, ["Australian_party_style"] = 6000, ["Australian_politics/name"] = 4200, ["Australian_politics/party_colours"] = 6100, ["Austria_metadata_Wikidata"] = 2100, ["Austria_population_Wikidata"] = 2100, ["Aut"] = 8200, ["Authority_control"] = 2010000, ["Authority_control_(arts)"] = 16000, ["Auto_link"] = 79000, ["Autobiography"] = 2100, ["Automated_tools"] = 88000, ["Automated_tools/core"] = 88000, ["Automatic_Taxobox"] = 2600, ["Automatic_archive_navigator"] = 128000, ["Automatic_taxobox"] = 74000, ["Aviation_accidents_and_incidents"] = 2200, ["Awaiting_admin"] = 2600, ["Awaitingadmin"] = 2500, ["Award2"] = 2400, ["Awards"] = 2400, ["Awards_table"] = 5500, ["Awards_table/styles.css"] = 5500, ["Ayd"] = 2900, ["Aye"] = 25000, ["Module:A_or_an"] = 29000, ["Module:A_or_an/words"] = 29000, ["Module:About"] = 151000, ["Module:Adjacent_stations"] = 73000, ["Module:Adjacent_stations/Amtrak"] = 2400, ["Module:Adjacent_stations/Indian_Railways"] = 3200, ["Module:Adjacent_stations/JR_East"] = 2200, ["Module:Adjacent_stations/i18n"] = 73000, ["Module:AfC_submission_catcheck"] = 377000, ["Module:AfC_topic"] = 26000, ["Module:Age"] = 1170000, ["Module:Ahnentafel"] = 8300, ["Module:Airport_destination_list"] = 4900, ["Module:Aligned_dates_list"] = 2200, ["Module:Aligned_table"] = 13000, ["Module:Anchor"] = 76000, ["Module:Ancient_Egypt_era"] = 2800, ["Module:Ancient_Egypt_era/data"] = 2800, ["Module:Ancient_Egypt_kings"] = 2800, ["Module:Ancient_Egypt_kings/data"] = 2800, ["Module:Ancient_Olympiads"] = 2800, ["Module:Ancient_Olympiads/data"] = 2800, ["Module:Annotated_link"] = 7300, ["Module:Archive_list"] = 71000, ["Module:Arguments"] = 31400000, ["Module:Armenian"] = 2800, ["Module:Article_history"] = 47000, ["Module:Article_history/Category"] = 47000, ["Module:Article_history/config"] = 47000, ["Module:Article_history/styles.css"] = 46000, ["Module:Asbox"] = 2390000, ["Module:Asbox_stubtree"] = 36000, ["Module:Attached_KML"] = 13000, ["Module:Attached_KML/styles.css"] = 13000, ["Module:Australian_place_map"] = 16000, ["Module:Authority_control"] = 2020000, ["Module:Authority_control/auxiliary"] = 570000, ["Module:Authority_control/config"] = 2020000, ["Module:Automated_taxobox"] = 363000, ["Module:Automatic_archive_navigator"] = 128000, ["Module:Automatic_archive_navigator/config"] = 128000, ["Module:Autotaxobox"] = 565000, } cebaf1f2f535de9475a2f01167959c718cc0f616 Module:Transclusion count/data/C 828 945 1879 2023-07-09T05:10:26Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["C"] = 748000, ["C-Class"] = 43000, ["C-SPAN"] = 12000, ["C-cmn"] = 2600, ["C-pl"] = 52000, ["C."] = 3900, ["CAN"] = 20000, ["CANelec"] = 14000, ["CANelec/gain"] = 2600, ["CANelec/hold"] = 4900, ["CANelec/source"] = 7000, ["CANelec/top"] = 6300, ["CANelec/total"] = 6200, ["CAS"] = 3800, ["CBB_Standings_End"] = 14000, ["CBB_Standings_Entry"] = 14000, ["CBB_Standings_Start"] = 14000, ["CBB_Yearly_Record_End"] = 3100, ["CBB_Yearly_Record_Entry"] = 3100, ["CBB_Yearly_Record_Start"] = 3000, ["CBB_Yearly_Record_Subhead"] = 3700, ["CBB_Yearly_Record_Subtotal"] = 2900, ["CBB_roster/Footer"] = 7800, ["CBB_roster/Header"] = 7800, ["CBB_roster/Player"] = 7800, ["CBB_schedule_end"] = 11000, ["CBB_schedule_entry"] = 11000, ["CBB_schedule_start"] = 11000, ["CBB_standings_end"] = 15000, ["CBB_standings_entry"] = 15000, ["CBB_standings_start"] = 15000, ["CBB_yearly_record_end"] = 4100, ["CBB_yearly_record_end/legend"] = 3600, ["CBB_yearly_record_entry"] = 4100, ["CBB_yearly_record_start"] = 4000, ["CBB_yearly_record_subhead"] = 3700, ["CBB_yearly_record_subtotal"] = 3800, ["CBSB_Standings_End"] = 4200, ["CBSB_Standings_Entry"] = 4200, ["CBSB_Standings_Start"] = 4200, ["CBSB_link"] = 3500, ["CBSB_standings_end"] = 4400, ["CBSB_standings_entry"] = 4400, ["CBSB_standings_start"] = 4400, ["CC0"] = 4000, ["CENTURY"] = 16000, ["CFB_Standings_End"] = 33000, ["CFB_Standings_Entry"] = 34000, ["CFB_Standings_Start"] = 34000, ["CFB_Yearly_Record_End"] = 6700, ["CFB_Yearly_Record_End/legend"] = 2300, ["CFB_Yearly_Record_Entry"] = 6700, ["CFB_Yearly_Record_Start"] = 6700, ["CFB_Yearly_Record_Subhead"] = 6700, ["CFB_Yearly_Record_Subtotal"] = 6600, ["CFB_schedule"] = 26000, ["CFB_schedule_entry"] = 19000, ["CFB_standings_end"] = 34000, ["CFB_standings_entry"] = 34000, ["CFB_standings_start"] = 34000, ["CFL_Year"] = 5600, ["CGF_year"] = 2600, ["CHE"] = 10000, ["CHI"] = 2700, ["CHL"] = 3600, ["CHN"] = 11000, ["CN"] = 3400, ["CO2"] = 3200, ["COI"] = 14000, ["COIUL"] = 128000, ["COI_editnotice"] = 6600, ["COL"] = 4900, ["COLON"] = 13000, ["CRI"] = 2200, ["CRO"] = 5200, ["CSK"] = 2800, ["CSS_image_crop"] = 4500, ["CUB"] = 3700, ["CURRENTDATE"] = 3600, ["CURRENTMINUTE"] = 2500, ["CYP"] = 2000, ["CZE"] = 15000, ["Calendar"] = 2400, ["California/color"] = 11000, ["Call_sign_disambiguation"] = 3000, ["Campaignbox"] = 23000, ["CanProvName"] = 14000, ["CanadaByProvinceCatNav"] = 9800, ["CanadaProvinceThe"] = 4000, ["Canadian_English"] = 6800, ["Canadian_Parliament_links"] = 5100, ["Canadian_election_result"] = 14000, ["Canadian_election_result/gain"] = 2600, ["Canadian_election_result/hold"] = 5000, ["Canadian_election_result/source"] = 8100, ["Canadian_election_result/top"] = 13000, ["Canadian_election_result/top/ElectionYearTest"] = 5700, ["Canadian_election_result/total"] = 11000, ["Canadian_party_colour"] = 8100, ["Canadian_party_colour/colour"] = 18000, ["Canadian_party_colour/colour/default"] = 18000, ["Canadian_party_colour/name"] = 15000, ["Canadian_party_colour/name/default"] = 6900, ["Canned_search"] = 5400, ["Cardinal_to_word"] = 6400, ["Cascite"] = 15000, ["Caselaw_source"] = 4000, ["Cassini-Ehess"] = 2600, ["Cast_listing"] = 15000, ["Castlist"] = 2300, ["Cat"] = 344000, ["CatAutoTOC"] = 656000, ["CatAutoTOC/core"] = 655000, ["CatRel"] = 3800, ["CatTrack"] = 3100, ["Cat_class"] = 6600, ["Cat_in_use"] = 50000, ["Cat_main"] = 198000, ["Cat_more"] = 101000, ["Cat_more_if_exists"] = 41000, ["Cat_see_also"] = 3500, ["Catalog_lookup_link"] = 514000, ["Category-Class"] = 14000, ["Category-inline"] = 8900, ["Category_TOC"] = 72000, ["Category_TOC/tracking"] = 72000, ["Category_U.S._State_elections_by_year"] = 7300, ["Category_U.S._State_elections_by_year/core"] = 7300, ["Category_class"] = 35000, ["Category_class/column"] = 35000, ["Category_class/second_row_column"] = 35000, ["Category_described_in_year"] = 5700, ["Category_diffuse"] = 8000, ["Category_disambiguation"] = 2400, ["Category_disambiguation/category_link"] = 2400, ["Category_explanation"] = 235000, ["Category_handler"] = 3290000, ["Category_ifexist"] = 5000, ["Category_importance"] = 10000, ["Category_importance/column"] = 10000, ["Category_importance/second_row_column"] = 10000, ["Category_link"] = 132000, ["Category_link_with_count"] = 6800, ["Category_more"] = 110000, ["Category_more_if_exists"] = 41000, ["Category_ordered_by_date"] = 11000, ["Category_other"] = 892000, ["Category_redirect"] = 108000, ["Category_see_also"] = 39000, ["Category_see_also/Category_pair_check"] = 39000, ["Category_see_also_if_exists"] = 72000, ["Category_see_also_if_exists_2"] = 88000, ["Category_title"] = 2400, ["Catexp"] = 7800, ["CathEncy"] = 2300, ["Catholic"] = 4100, ["Catholic_Encyclopedia"] = 5100, ["Catmain"] = 27000, ["Catmore"] = 9400, ["Cbb_link"] = 8600, ["Cbignore"] = 100000, ["Cbsb_link"] = 2100, ["Cc-by-2.5"] = 3900, ["Cc-by-3.0"] = 8700, ["Cc-by-sa-2.5"] = 2600, ["Cc-by-sa-2.5,2.0,1.0"] = 2600, ["Cc-by-sa-3.0"] = 26000, ["Cc-by-sa-3.0,2.5,2.0,1.0"] = 2300, ["Cc-by-sa-3.0-migrated"] = 24000, ["Cc-by-sa-4.0"] = 10000, ["Cc-zero"] = 3900, ["CensusAU"] = 9300, ["Census_2016_AUS"] = 7100, ["Cent"] = 5700, ["Center"] = 287000, ["Centralized_discussion"] = 6000, ["Centralized_discussion/core"] = 6000, ["Centralized_discussion/styles.css"] = 6000, ["Centre"] = 3200, ["Century"] = 2100, ["Century_name_from_decade"] = 2400, ["Century_name_from_decade_or_year"] = 77000, ["Century_name_from_title_decade"] = 7600, ["Century_name_from_title_year"] = 7500, ["Certification_Cite/Title"] = 30000, ["Certification_Cite/URL"] = 33000, ["Certification_Cite/archivedate"] = 6000, ["Certification_Cite/archiveurl"] = 6000, ["Certification_Cite_Ref"] = 29000, ["Certification_Table_Bottom"] = 29000, ["Certification_Table_Entry"] = 30000, ["Certification_Table_Entry/Foot"] = 28000, ["Certification_Table_Entry/Foot/helper"] = 28000, ["Certification_Table_Entry/Region"] = 29000, ["Certification_Table_Entry/Sales"] = 28000, ["Certification_Table_Entry/Sales/BelgianPeriod"] = 2100, ["Certification_Table_Entry/Sales/DanishPeriod"] = 3200, ["Certification_Table_Entry/Sales/DanishPeriodHelper1"] = 3200, ["Certification_Table_Entry/Sales/DanishPeriodHelper2"] = 3200, ["Certification_Table_Entry/Sales/GermanPeriod"] = 4000, ["Certification_Table_Entry/Sales/ItalianHelper"] = 3200, ["Certification_Table_Entry/Sales/NewZealandPeriod"] = 2000, ["Certification_Table_Entry/Sales/SwedishPeriod"] = 2100, ["Certification_Table_Separator"] = 2300, ["Certification_Table_Top"] = 30000, ["Cfb_link"] = 24000, ["Cfd_result"] = 2400, ["Cfdend"] = 4000, ["Chart"] = 4600, ["Chart/end"] = 4700, ["Chart/start"] = 4600, ["Chart_bottom"] = 3500, ["Chart_top"] = 3500, ["Check_completeness_of_transclusions"] = 7300, ["Check_talk"] = 30000, ["Check_talk_wp"] = 1370000, ["Check_winner_by_scores"] = 13000, ["CheckedSockpuppet"] = 7200, ["Checked_sockpuppet"] = 18000, ["Checkedsockpuppet"] = 5300, ["Checkip"] = 13000, ["Checkuser"] = 75000, ["Checkuserblock-account"] = 16000, ["Chem"] = 5800, ["Chem/atom"] = 5800, ["Chem/link"] = 5800, ["Chem2"] = 4700, ["Chem_molar_mass"] = 18000, ["Chem_molar_mass/format"] = 18000, ["Chembox"] = 14000, ["Chembox/styles.css"] = 14000, ["Chembox_3DMet"] = 14000, ["Chembox_3DMet/format"] = 14000, ["Chembox_AllOtherNames"] = 13000, ["Chembox_AllOtherNames/format"] = 13000, ["Chembox_Appearance"] = 6100, ["Chembox_BoilingPt"] = 3800, ["Chembox_CASNo"] = 14000, ["Chembox_CASNo/format"] = 14000, ["Chembox_CalcTemperatures"] = 6800, ["Chembox_ChEBI"] = 14000, ["Chembox_ChEBI/format"] = 14000, ["Chembox_ChEMBL"] = 14000, ["Chembox_ChEMBL/format"] = 14000, ["Chembox_ChemSpiderID"] = 14000, ["Chembox_ChemSpiderID/format"] = 14000, ["Chembox_CompTox"] = 14000, ["Chembox_CompTox/format"] = 14000, ["Chembox_Datapage_check"] = 14000, ["Chembox_Density"] = 4900, ["Chembox_DrugBank"] = 14000, ["Chembox_DrugBank/format"] = 14000, ["Chembox_ECHA"] = 7600, ["Chembox_ECNumber"] = 14000, ["Chembox_ECNumber/format"] = 14000, ["Chembox_Elements"] = 14000, ["Chembox_Elements/molecular_formula"] = 18000, ["Chembox_Footer"] = 14000, ["Chembox_Footer/tracking"] = 14000, ["Chembox_GHS_(set)"] = 3400, ["Chembox_Hazards"] = 11000, ["Chembox_IUPHAR_ligand"] = 14000, ["Chembox_IUPHAR_ligand/format"] = 14000, ["Chembox_Identifiers"] = 14000, ["Chembox_InChI"] = 12000, ["Chembox_InChI/format"] = 12000, ["Chembox_Indexlist"] = 14000, ["Chembox_Jmol"] = 14000, ["Chembox_Jmol/format"] = 14000, ["Chembox_KEGG"] = 14000, ["Chembox_KEGG/format"] = 14000, ["Chembox_MeltingPt"] = 5800, ["Chembox_Properties"] = 14000, ["Chembox_PubChem"] = 14000, ["Chembox_PubChem/format"] = 14000, ["Chembox_RTECS"] = 14000, ["Chembox_RTECS/format"] = 14000, ["Chembox_Related"] = 3300, ["Chembox_SMILES"] = 13000, ["Chembox_SMILES/format"] = 13000, ["Chembox_SolubilityInWater"] = 3900, ["Chembox_Structure"] = 2100, ["Chembox_UNII"] = 14000, ["Chembox_UNII/format"] = 14000, ["Chembox_headerbar"] = 14000, ["Chembox_image"] = 13000, ["Chembox_image_cell"] = 12000, ["Chembox_image_sbs"] = 13000, ["Chembox_parametercheck"] = 13000, ["Chembox_setDatarow"] = 4500, ["Chembox_setHeader"] = 4500, ["Chembox_templatePar/formatPreviewMessage"] = 14000, ["Chembox_verification"] = 7100, ["Chemicals"] = 7400, ["Chemistry"] = 3100, ["Chemspidercite"] = 11000, ["Chessgames_player"] = 3600, ["Chinese"] = 7300, ["Chr"] = 9100, ["ChristianityWikiProject"] = 5800, ["Circa"] = 69000, ["Circular_reference"] = 4100, ["Citation"] = 401000, ["Citation/make_link"] = 6000, ["Citation/styles.css"] = 46000, ["Citation_needed"] = 541000, ["Citation_needed_span"] = 3500, ["Citation_style"] = 4200, ["Cite_AV_media"] = 42000, ["Cite_AV_media_notes"] = 26000, ["Cite_Appletons'"] = 2400, ["Cite_Australian_Dictionary_of_Biography"] = 3300, ["Cite_Catholic_Encyclopedia"] = 8100, ["Cite_Colledge2006"] = 3100, ["Cite_DCB"] = 2800, ["Cite_DNB"] = 18000, ["Cite_EB1911"] = 25000, ["Cite_GNIS"] = 2300, ["Cite_Gaia_DR2"] = 2100, ["Cite_Jewish_Encyclopedia"] = 2900, ["Cite_NIE"] = 3600, ["Cite_NSW_Parliament"] = 3300, ["Cite_NSW_SHR"] = 2600, ["Cite_ODNB"] = 17000, ["Cite_Q"] = 43000, ["Cite_QHR"] = 3000, ["Cite_QPN"] = 4000, ["Cite_Rowlett"] = 2500, ["Cite_Russian_law"] = 7800, ["Cite_Ryan"] = 3200, ["Cite_Sports-Reference"] = 54000, ["Cite_USGov"] = 24000, ["Cite_WoRMS"] = 5400, ["Cite_act"] = 2700, ["Cite_arXiv"] = 5000, ["Cite_bcgnis"] = 3100, ["Cite_book"] = 1580000, ["Cite_certification"] = 33000, ["Cite_cgndb"] = 3200, ["Cite_comic"] = 2000, ["Cite_conference"] = 16000, ["Cite_court"] = 5300, ["Cite_court/styles.css"] = 5300, ["Cite_dictionary"] = 3700, ["Cite_document"] = 5900, ["Cite_encyclopedia"] = 201000, ["Cite_episode"] = 17000, ["Cite_gnis"] = 34000, ["Cite_interview"] = 7700, ["Cite_iucn"] = 58000, ["Cite_journal"] = 952000, ["Cite_magazine"] = 264000, ["Cite_manual"] = 2000, ["Cite_map"] = 38000, ["Cite_news"] = 1500000, ["Cite_newspaper_The_Times"] = 6500, ["Cite_patent"] = 5400, ["Cite_patent/authors"] = 4400, ["Cite_patent/core"] = 5800, ["Cite_peakbagger"] = 4500, ["Cite_podcast"] = 3700, ["Cite_press_release"] = 64000, ["Cite_report"] = 35000, ["Cite_rowlett"] = 2500, ["Cite_simbad"] = 4500, ["Cite_sports-reference"] = 59000, ["Cite_thesis"] = 31000, ["Cite_tweet"] = 35000, ["Cite_video"] = 12000, ["Cite_video_game"] = 3100, ["Cite_web"] = 4540000, ["Cite_wikisource"] = 5500, ["Cite_wikisource/make_link"] = 58000, ["Civil_navigation"] = 2700, ["Cl"] = 129000, ["Clade"] = 7500, ["Clade/styles.css"] = 7500, ["Clarify"] = 40000, ["Class"] = 2940000, ["Class/colour"] = 2200000, ["Class/icon"] = 23000, ["Class_mask"] = 8570000, ["Class_mask/b"] = 294000, ["Classical"] = 6900, ["Classicon"] = 4700, ["Clc"] = 5900, ["Cleanup"] = 10000, ["Cleanup_bare_URLs"] = 29000, ["Cleanup_reorganize"] = 2500, ["Cleanup_rewrite"] = 5800, ["Clear"] = 2930000, ["Clear-left"] = 16000, ["Clear_left"] = 30000, ["Clear_right"] = 2900, ["Clerk-Note"] = 9800, ["Clerknote"] = 7400, ["Clickable_button"] = 16000, ["Clickable_button_2"] = 954000, ["Closed_access"] = 4400, ["Closed_rfc_top"] = 2200, ["Clr"] = 3700, ["Clubplayerscat"] = 8400, ["Cmbox"] = 417000, ["Cn"] = 92000, ["Cnote2"] = 2200, ["Cnote2_Begin"] = 2300, ["Cnote2_End"] = 2300, ["Coat_of_arms"] = 5200, ["Cob"] = 12000, ["Code"] = 50000, ["Col-1-of-2"] = 2400, ["Col-2"] = 170000, ["Col-2-of-2"] = 2300, ["Col-3"] = 9900, ["Col-4"] = 3500, ["Col-begin"] = 212000, ["Col-break"] = 210000, ["Col-end"] = 210000, ["Col-float"] = 2700, ["Col-float-break"] = 2600, ["Col-float-end"] = 2600, ["Col-float/styles.css"] = 2700, ["Col-start"] = 20000, ["Colbegin"] = 21000, ["Colend"] = 24000, ["Collapse"] = 9600, ["Collapse_bottom"] = 51000, ["Collapse_top"] = 51000, ["Collapsebottom"] = 3800, ["Collapsetop"] = 3800, ["Collapsible_list"] = 53000, ["Collapsible_option"] = 134000, ["College"] = 8800, ["CollegePrimaryHeader"] = 5800, ["CollegePrimaryStyle"] = 96000, ["CollegeSecondaryStyle"] = 3400, ["College_Athlete_Recruit_End"] = 2800, ["College_Athlete_Recruit_Entry"] = 3000, ["College_Athlete_Recruit_Start"] = 2900, ["College_athlete_recruit_end"] = 4000, ["College_athlete_recruit_entry"] = 4100, ["College_athlete_recruit_start"] = 4100, ["College_color_list"] = 3900, ["Colon"] = 18000, ["Color"] = 467000, ["Color_box"] = 73000, ["Colorbox"] = 3600, ["Colorbull"] = 4900, ["Colored_link"] = 62000, ["Colors"] = 3800, ["Colour"] = 5800, ["Coloured_link"] = 6900, ["Column"] = 2400, ["Column/styles.css"] = 2500, ["Columns-end"] = 2200, ["Columns-list"] = 98000, ["Columns-start"] = 2200, ["Comedy"] = 2500, ["Comic_Book_DB"] = 3500, ["Comicbookdb"] = 3500, ["Comics-replaceability"] = 2900, ["Comics_infobox_sec/creator_nat"] = 2800, ["Comics_infobox_sec/formcat"] = 3200, ["Comics_infobox_sec/genre"] = 3900, ["Comics_infobox_sec/genrecat"] = 3600, ["Comics_infobox_sec/styles.css"] = 8100, ["Comicsproj"] = 28000, ["Comma_separated_entries"] = 425000, ["Comma_separated_values"] = 44000, ["Comment"] = 5100, ["Committed_identity"] = 3000, ["Committed_identity/styles.css"] = 3000, ["Commons"] = 66000, ["Commons-inline"] = 20000, ["Commons_cat"] = 48000, ["Commons_category"] = 843000, ["Commons_category-inline"] = 146000, ["Commons_category_inline"] = 6000, ["Commonscat"] = 66000, ["Commonscat-inline"] = 18000, ["Commonscat_inline"] = 2400, ["Commonscatinline"] = 6500, ["Compact_TOC"] = 6900, ["Compact_ToC"] = 4900, ["Compare"] = 5100, ["Compare_image_with_Wikidata"] = 10000, ["Composition_bar"] = 10000, ["Confirmed"] = 16000, ["Confused"] = 2800, ["Confusing"] = 2300, ["CongBio"] = 9700, ["CongLinks"] = 4500, ["Connected_contributor"] = 17000, ["Connected_contributor_(paid)"] = 6800, ["Constellation_navbox"] = 6700, ["Container"] = 11000, ["Container_cat"] = 7500, ["Container_category"] = 42000, ["Containercat"] = 2600, ["Contains_special_characters"] = 4000, ["Contains_special_characters/core"] = 4000, ["Contains_special_characters/styles.css"] = 4000, ["Content_category"] = 7600, ["Contentious_topics/list"] = 13000, ["Contentious_topics/page_restriction_editnotice_base"] = 2400, ["Contentious_topics/page_restriction_talk_notice_base"] = 3600, ["Contentious_topics/talk_notice"] = 6500, ["Context"] = 2700, ["Continent2continental"] = 16000, ["Continent_adjective_to_noun"] = 2200, ["Controversial"] = 3200, ["Convert"] = 1170000, ["Convinfobox"] = 204000, ["Convinfobox/2"] = 17000, ["Convinfobox/3"] = 119000, ["Convinfobox/pri2"] = 63000, ["Convinfobox/prisec2"] = 3000, ["Convinfobox/prisec3"] = 25000, ["Convinfobox/sec2"] = 9200, ["Coord"] = 1330000, ["Coord_missing"] = 96000, ["Coord_missing/CheckCat"] = 95000, ["Coords"] = 8000, ["Copied"] = 18000, ["Copy_edit"] = 2500, ["Copy_to_Wikimedia_Commons"] = 111000, ["Copyvios"] = 4700, ["Cospar"] = 2500, ["Cot"] = 12000, ["Count"] = 658000, ["Country2continent"] = 36000, ["Country2continental"] = 2400, ["Country2nationality"] = 341000, ["CountryPrefixThe"] = 109000, ["Country_abbreviation"] = 88000, ["Country_alias"] = 15000, ["Country_at_games_navbox"] = 2600, ["Country_at_games_navbox/below"] = 2600, ["Country_data"] = 6800, ["Country_data_AFG"] = 2200, ["Country_data_ALB"] = 6600, ["Country_data_ALG"] = 9200, ["Country_data_AND"] = 3000, ["Country_data_ANG"] = 3900, ["Country_data_ARG"] = 47000, ["Country_data_ARM"] = 7300, ["Country_data_AUS"] = 75000, ["Country_data_AUT"] = 45000, ["Country_data_AZE"] = 9100, ["Country_data_Afghanistan"] = 12000, ["Country_data_Alaska"] = 2200, ["Country_data_Albania"] = 20000, ["Country_data_Alberta"] = 3600, ["Country_data_Algeria"] = 24000, ["Country_data_American_Samoa"] = 2900, ["Country_data_Andorra"] = 7900, ["Country_data_Angola"] = 11000, ["Country_data_Anguilla"] = 2500, ["Country_data_Antigua_and_Barbuda"] = 6000, ["Country_data_Apulia"] = 7900, ["Country_data_Argentina"] = 80000, ["Country_data_Arizona"] = 2300, ["Country_data_Arkansas"] = 2100, ["Country_data_Armenia"] = 22000, ["Country_data_Aruba"] = 3600, ["Country_data_Australia"] = 125000, ["Country_data_Austria"] = 78000, ["Country_data_Azerbaijan"] = 27000, ["Country_data_BAH"] = 3800, ["Country_data_BAN"] = 3800, ["Country_data_BAR"] = 2400, ["Country_data_BEL"] = 51000, ["Country_data_BER"] = 2300, ["Country_data_BHR"] = 4500, ["Country_data_BIH"] = 13000, ["Country_data_BLR"] = 24000, ["Country_data_BOL"] = 5700, ["Country_data_BOT"] = 2300, ["Country_data_BRA"] = 57000, ["Country_data_BUL"] = 26000, ["Country_data_Bahamas"] = 9600, ["Country_data_Bahrain"] = 12000, ["Country_data_Bangladesh"] = 18000, ["Country_data_Barbados"] = 8000, ["Country_data_Belarus"] = 43000, ["Country_data_Belgium"] = 88000, ["Country_data_Belize"] = 5200, ["Country_data_Benin"] = 7300, ["Country_data_Bermuda"] = 5700, ["Country_data_Bhutan"] = 4700, ["Country_data_Bolivia"] = 14000, ["Country_data_Bosnia_and_Herzegovina"] = 29000, ["Country_data_Botswana"] = 9100, ["Country_data_Brazil"] = 101000, ["Country_data_British_Columbia"] = 3400, ["Country_data_British_Raj"] = 2200, ["Country_data_British_Virgin_Islands"] = 3300, ["Country_data_Brunei"] = 6200, ["Country_data_Bulgaria"] = 52000, ["Country_data_Burkina_Faso"] = 10000, ["Country_data_Burma"] = 2700, ["Country_data_Burundi"] = 6000, ["Country_data_CAM"] = 2100, ["Country_data_CAN"] = 58000, ["Country_data_CGO"] = 2400, ["Country_data_CHE"] = 4700, ["Country_data_CHI"] = 17000, ["Country_data_CHL"] = 2100, ["Country_data_CHN"] = 41000, ["Country_data_CIV"] = 8000, ["Country_data_CMR"] = 8600, ["Country_data_COD"] = 3200, ["Country_data_COL"] = 25000, ["Country_data_CPV"] = 2000, ["Country_data_CRC"] = 6600, ["Country_data_CRO"] = 33000, ["Country_data_CUB"] = 9900, ["Country_data_CYP"] = 9000, ["Country_data_CZE"] = 46000, ["Country_data_California"] = 5900, ["Country_data_Cambodia"] = 8800, ["Country_data_Cameroon"] = 18000, ["Country_data_Canada"] = 121000, ["Country_data_Cape_Verde"] = 6300, ["Country_data_Castile_and_León"] = 2000, ["Country_data_Catalonia"] = 3100, ["Country_data_Cayman_Islands"] = 4100, ["Country_data_Central_African_Republic"] = 5100, ["Country_data_Chad"] = 5500, ["Country_data_Chile"] = 40000, ["Country_data_China"] = 83000, ["Country_data_Chinese_Taipei"] = 19000, ["Country_data_Colombia"] = 46000, ["Country_data_Colorado"] = 5700, ["Country_data_Comoros"] = 4400, ["Country_data_Confederate_States_of_America"] = 3100, ["Country_data_Connecticut"] = 3200, ["Country_data_Cook_Islands"] = 3800, ["Country_data_Costa_Rica"] = 18000, ["Country_data_Croatia"] = 56000, ["Country_data_Cuba"] = 22000, ["Country_data_Curaçao"] = 3500, ["Country_data_Cyprus"] = 22000, ["Country_data_Czech_Republic"] = 81000, ["Country_data_Czechoslovakia"] = 19000, ["Country_data_DEN"] = 34000, ["Country_data_DEU"] = 8600, ["Country_data_DNK"] = 3600, ["Country_data_DOM"] = 7200, ["Country_data_Democratic_Republic_of_the_Congo"] = 13000, ["Country_data_Denmark"] = 69000, ["Country_data_Djibouti"] = 4600, ["Country_data_Dominica"] = 4300, ["Country_data_Dominican_Republic"] = 17000, ["Country_data_ECU"] = 12000, ["Country_data_EGY"] = 13000, ["Country_data_ENG"] = 46000, ["Country_data_ESA"] = 2200, ["Country_data_ESP"] = 72000, ["Country_data_EST"] = 14000, ["Country_data_ETH"] = 3400, ["Country_data_EU"] = 3700, ["Country_data_East_Germany"] = 14000, ["Country_data_East_Timor"] = 4900, ["Country_data_Ecuador"] = 25000, ["Country_data_Egypt"] = 32000, ["Country_data_El_Salvador"] = 13000, ["Country_data_Empire_of_Japan"] = 4000, ["Country_data_England"] = 96000, ["Country_data_Equatorial_Guinea"] = 5200, ["Country_data_Eritrea"] = 5400, ["Country_data_Estonia"] = 34000, ["Country_data_Eswatini"] = 5000, ["Country_data_Ethiopia"] = 13000, ["Country_data_Europe"] = 2400, ["Country_data_European_Union"] = 7300, ["Country_data_FIJ"] = 3800, ["Country_data_FIN"] = 34000, ["Country_data_FRA"] = 97000, ["Country_data_FRG"] = 15000, ["Country_data_FRO"] = 2000, ["Country_data_FR_Yugoslavia"] = 4000, ["Country_data_Faroe_Islands"] = 5400, ["Country_data_Federated_States_of_Micronesia"] = 3000, ["Country_data_Fiji"] = 12000, ["Country_data_Finland"] = 68000, ["Country_data_Florida"] = 6500, ["Country_data_France"] = 192000, ["Country_data_French_Guiana"] = 2100, ["Country_data_French_Polynesia"] = 3800, ["Country_data_GAB"] = 2400, ["Country_data_GAM"] = 2000, ["Country_data_GBR"] = 54000, ["Country_data_GDR"] = 8100, ["Country_data_GEO"] = 14000, ["Country_data_GER"] = 81000, ["Country_data_GHA"] = 9700, ["Country_data_GRE"] = 25000, ["Country_data_GUA"] = 5000, ["Country_data_GUI"] = 3100, ["Country_data_GUY"] = 2300, ["Country_data_Gabon"] = 7500, ["Country_data_Gambia"] = 6800, ["Country_data_Georgia"] = 8200, ["Country_data_Georgia_(U.S._state)"] = 2800, ["Country_data_Georgia_(country)"] = 29000, ["Country_data_German_Empire"] = 5400, ["Country_data_Germany"] = 150000, ["Country_data_Ghana"] = 23000, ["Country_data_Gibraltar"] = 4900, ["Country_data_Great_Britain"] = 73000, ["Country_data_Greece"] = 57000, ["Country_data_Greenland"] = 2800, ["Country_data_Grenada"] = 5100, ["Country_data_Guadeloupe"] = 2800, ["Country_data_Guam"] = 4700, ["Country_data_Guatemala"] = 13000, ["Country_data_Guernsey"] = 2200, ["Country_data_Guinea"] = 8300, ["Country_data_Guinea-Bissau"] = 5000, ["Country_data_Guyana"] = 7400, ["Country_data_HAI"] = 3100, ["Country_data_HKG"] = 13000, ["Country_data_HON"] = 4300, ["Country_data_HUN"] = 37000, ["Country_data_Haiti"] = 8700, ["Country_data_Honduras"] = 12000, ["Country_data_Hong_Kong"] = 26000, ["Country_data_Hungary"] = 70000, ["Country_data_IDN"] = 5000, ["Country_data_INA"] = 10000, ["Country_data_IND"] = 30000, ["Country_data_IRE"] = 10000, ["Country_data_IRI"] = 5400, ["Country_data_IRL"] = 21000, ["Country_data_IRN"] = 6200, ["Country_data_IRQ"] = 4100, ["Country_data_ISL"] = 8500, ["Country_data_ISR"] = 21000, ["Country_data_ITA"] = 85000, ["Country_data_Iceland"] = 23000, ["Country_data_Idaho"] = 2100, ["Country_data_Illinois"] = 4500, ["Country_data_India"] = 109000, ["Country_data_Indiana"] = 2800, ["Country_data_Indonesia"] = 37000, ["Country_data_Iowa"] = 3000, ["Country_data_Iran"] = 91000, ["Country_data_Iraq"] = 14000, ["Country_data_Ireland"] = 34000, ["Country_data_Isle_of_Man"] = 2800, ["Country_data_Israel"] = 45000, ["Country_data_Italy"] = 144000, ["Country_data_Ivory_Coast"] = 18000, ["Country_data_JAM"] = 9400, ["Country_data_JOR"] = 4000, ["Country_data_JP"] = 8100, ["Country_data_JPN"] = 59000, ["Country_data_Jamaica"] = 21000, ["Country_data_Japan"] = 118000, ["Country_data_Jersey"] = 2500, ["Country_data_Jordan"] = 12000, ["Country_data_KAZ"] = 19000, ["Country_data_KEN"] = 7200, ["Country_data_KGZ"] = 3700, ["Country_data_KOR"] = 31000, ["Country_data_KOS"] = 2300, ["Country_data_KSA"] = 5900, ["Country_data_KUW"] = 4100, ["Country_data_Kazakhstan"] = 33000, ["Country_data_Kenya"] = 19000, ["Country_data_Kingdom_of_France"] = 2100, ["Country_data_Kingdom_of_Great_Britain"] = 4800, ["Country_data_Kingdom_of_Italy"] = 4200, ["Country_data_Kiribati"] = 2900, ["Country_data_Kosovo"] = 8700, ["Country_data_Kuwait"] = 11000, ["Country_data_Kyrgyzstan"] = 9300, ["Country_data_LAT"] = 14000, ["Country_data_LBN"] = 2300, ["Country_data_LIB"] = 2500, ["Country_data_LIE"] = 3100, ["Country_data_LIT"] = 3000, ["Country_data_LTU"] = 12000, ["Country_data_LUX"] = 10000, ["Country_data_LVA"] = 2600, ["Country_data_Laos"] = 7500, ["Country_data_Latvia"] = 32000, ["Country_data_Lebanon"] = 15000, ["Country_data_Lesotho"] = 5200, ["Country_data_Liberia"] = 7200, ["Country_data_Libya"] = 8700, ["Country_data_Liechtenstein"] = 7800, ["Country_data_Lithuania"] = 31000, ["Country_data_Luxembourg"] = 24000, ["Country_data_MAC"] = 2400, ["Country_data_MAR"] = 12000, ["Country_data_MAS"] = 11000, ["Country_data_MDA"] = 7600, ["Country_data_MEX"] = 30000, ["Country_data_MGL"] = 2900, ["Country_data_MKD"] = 7500, ["Country_data_MLI"] = 4300, ["Country_data_MLT"] = 5500, ["Country_data_MNE"] = 7800, ["Country_data_MON"] = 3700, ["Country_data_MOZ"] = 2100, ["Country_data_MRI"] = 2000, ["Country_data_MYA"] = 3000, ["Country_data_MYS"] = 3700, ["Country_data_Macau"] = 6300, ["Country_data_Macedonia"] = 4900, ["Country_data_Madagascar"] = 9100, ["Country_data_Malawi"] = 5700, ["Country_data_Malaysia"] = 36000, ["Country_data_Maldives"] = 6000, ["Country_data_Mali"] = 12000, ["Country_data_Malta"] = 17000, ["Country_data_Manitoba"] = 2500, ["Country_data_Marshall_Islands"] = 3700, ["Country_data_Martinique"] = 2800, ["Country_data_Maryland"] = 3100, ["Country_data_Massachusetts"] = 3000, ["Country_data_Mauritania"] = 5800, ["Country_data_Mauritius"] = 8000, ["Country_data_Mexico"] = 66000, ["Country_data_Michigan"] = 4300, ["Country_data_Minnesota"] = 3800, ["Country_data_Missouri"] = 2100, ["Country_data_Moldova"] = 19000, ["Country_data_Monaco"] = 10000, ["Country_data_Mongolia"] = 9700, ["Country_data_Montana"] = 2100, ["Country_data_Montenegro"] = 18000, ["Country_data_Montserrat"] = 2500, ["Country_data_Morocco"] = 27000, ["Country_data_Mozambique"] = 7300, ["Country_data_Myanmar"] = 14000, ["Country_data_NAM"] = 3400, ["Country_data_NED"] = 60000, ["Country_data_NEP"] = 2800, ["Country_data_NGA"] = 8100, ["Country_data_NGR"] = 7900, ["Country_data_NIR"] = 9900, ["Country_data_NLD"] = 6100, ["Country_data_NOR"] = 29000, ["Country_data_NZ"] = 3100, ["Country_data_NZL"] = 32000, ["Country_data_Namibia"] = 9800, ["Country_data_Nauru"] = 2500, ["Country_data_Nazi_Germany"] = 9700, ["Country_data_Nepal"] = 17000, ["Country_data_Netherlands"] = 113000, ["Country_data_Netherlands_Antilles"] = 2300, ["Country_data_New_Brunswick"] = 2500, ["Country_data_New_Caledonia"] = 3400, ["Country_data_New_Jersey"] = 4200, ["Country_data_New_South_Wales"] = 5800, ["Country_data_New_York"] = 4900, ["Country_data_New_York_(state)"] = 6800, ["Country_data_New_Zealand"] = 66000, ["Country_data_Newfoundland_and_Labrador"] = 2300, ["Country_data_Nicaragua"] = 8300, ["Country_data_Niger"] = 5900, ["Country_data_Nigeria"] = 32000, ["Country_data_North_Carolina"] = 3500, ["Country_data_North_Korea"] = 13000, ["Country_data_North_Macedonia"] = 18000, ["Country_data_Northern_Ireland"] = 15000, ["Country_data_Northern_Mariana_Islands"] = 2900, ["Country_data_Norway"] = 72000, ["Country_data_Nova_Scotia"] = 2300, ["Country_data_OMA"] = 2700, ["Country_data_Ohio"] = 4800, ["Country_data_Oman"] = 8700, ["Country_data_Ontario"] = 3800, ["Country_data_Ottoman_Empire"] = 2600, ["Country_data_PAK"] = 8000, ["Country_data_PAN"] = 5700, ["Country_data_PAR"] = 9900, ["Country_data_PER"] = 12000, ["Country_data_PHI"] = 11000, ["Country_data_PHL"] = 2500, ["Country_data_PNG"] = 2700, ["Country_data_POL"] = 49000, ["Country_data_POR"] = 31000, ["Country_data_PRC"] = 2100, ["Country_data_PRK"] = 4600, ["Country_data_PRT"] = 2800, ["Country_data_PUR"] = 7200, ["Country_data_Pakistan"] = 28000, ["Country_data_Palau"] = 3000, ["Country_data_Palestine"] = 6700, ["Country_data_Panama"] = 16000, ["Country_data_Papua_New_Guinea"] = 7900, ["Country_data_Paraguay"] = 21000, ["Country_data_Pennsylvania"] = 3700, ["Country_data_People's_Republic_of_China"] = 3300, ["Country_data_Peru"] = 30000, ["Country_data_Philippines"] = 34000, ["Country_data_Poland"] = 149000, ["Country_data_Portugal"] = 68000, ["Country_data_Prussia"] = 2600, ["Country_data_Puerto_Rico"] = 17000, ["Country_data_QAT"] = 7700, ["Country_data_Qatar"] = 17000, ["Country_data_Quebec"] = 4200, ["Country_data_ROM"] = 13000, ["Country_data_ROU"] = 26000, ["Country_data_RSA"] = 31000, ["Country_data_RUS"] = 62000, ["Country_data_Republic_of_China"] = 5700, ["Country_data_Republic_of_Ireland"] = 25000, ["Country_data_Republic_of_the_Congo"] = 7600, ["Country_data_Romania"] = 68000, ["Country_data_Russia"] = 114000, ["Country_data_Russian_Empire"] = 4900, ["Country_data_Rwanda"] = 7600, ["Country_data_SAM"] = 3100, ["Country_data_SCG"] = 3100, ["Country_data_SCO"] = 26000, ["Country_data_SEN"] = 7900, ["Country_data_SER"] = 3600, ["Country_data_SGP"] = 2600, ["Country_data_SIN"] = 6900, ["Country_data_SLO"] = 19000, ["Country_data_SLV"] = 3000, ["Country_data_SMR"] = 3100, ["Country_data_SPA"] = 4700, ["Country_data_SRB"] = 26000, ["Country_data_SRI"] = 4600, ["Country_data_SUI"] = 42000, ["Country_data_SUR"] = 2000, ["Country_data_SVK"] = 28000, ["Country_data_SVN"] = 6700, ["Country_data_SWE"] = 56000, ["Country_data_SWI"] = 4700, ["Country_data_SYR"] = 3600, ["Country_data_Saint_Kitts_and_Nevis"] = 4800, ["Country_data_Saint_Lucia"] = 4900, ["Country_data_Saint_Vincent_and_the_Grenadines"] = 4800, ["Country_data_Samoa"] = 7700, ["Country_data_San_Marino"] = 8400, ["Country_data_Saskatchewan"] = 2900, ["Country_data_Saudi_Arabia"] = 19000, ["Country_data_Scotland"] = 51000, ["Country_data_Senegal"] = 17000, ["Country_data_Serbia"] = 54000, ["Country_data_Serbia_and_Montenegro"] = 5100, ["Country_data_Seychelles"] = 5500, ["Country_data_Sierra_Leone"] = 7300, ["Country_data_Singapore"] = 27000, ["Country_data_Slovakia"] = 50000, ["Country_data_Slovenia"] = 43000, ["Country_data_Solomon_Islands"] = 4700, ["Country_data_Somalia"] = 6200, ["Country_data_South_Africa"] = 69000, ["Country_data_South_Carolina"] = 3300, ["Country_data_South_Korea"] = 66000, ["Country_data_South_Sudan"] = 4100, ["Country_data_Soviet_Union"] = 36000, ["Country_data_Spain"] = 132000, ["Country_data_Sri_Lanka"] = 19000, ["Country_data_Sudan"] = 8000, ["Country_data_Suriname"] = 6500, ["Country_data_Sweden"] = 100000, ["Country_data_Switzerland"] = 82000, ["Country_data_Syria"] = 15000, ["Country_data_São_Tomé_and_Príncipe"] = 3400, ["Country_data_TAN"] = 2500, ["Country_data_TCH"] = 11000, ["Country_data_THA"] = 21000, ["Country_data_TJK"] = 2600, ["Country_data_TKM"] = 2800, ["Country_data_TPE"] = 15000, ["Country_data_TRI"] = 4700, ["Country_data_TUN"] = 10000, ["Country_data_TUR"] = 27000, ["Country_data_Taiwan"] = 13000, ["Country_data_Tajikistan"] = 9000, ["Country_data_Tanzania"] = 12000, ["Country_data_Texas"] = 5300, ["Country_data_Thailand"] = 44000, ["Country_data_Togo"] = 6900, ["Country_data_Tonga"] = 6400, ["Country_data_Trinidad_and_Tobago"] = 14000, ["Country_data_Tunisia"] = 22000, ["Country_data_Turkey"] = 75000, ["Country_data_Turkmenistan"] = 7800, ["Country_data_Turks_and_Caicos_Islands"] = 2600, ["Country_data_Tuvalu"] = 2800, ["Country_data_U.S."] = 2100, ["Country_data_U.S._Virgin_Islands"] = 4800, ["Country_data_UAE"] = 9200, ["Country_data_UGA"] = 4000, ["Country_data_UK"] = 18000, ["Country_data_UKGBI"] = 3100, ["Country_data_UKR"] = 37000, ["Country_data_URS"] = 14000, ["Country_data_URU"] = 15000, ["Country_data_US"] = 4900, ["Country_data_USA"] = 132000, ["Country_data_USSR"] = 4500, ["Country_data_UZB"] = 12000, ["Country_data_Uganda"] = 13000, ["Country_data_Ukraine"] = 72000, ["Country_data_United_Arab_Emirates"] = 20000, ["Country_data_United_Kingdom"] = 89000, ["Country_data_United_Kingdom_of_Great_Britain_and_Ireland"] = 4400, ["Country_data_United_Nations"] = 4000, ["Country_data_United_States"] = 281000, ["Country_data_United_States_of_America"] = 5000, ["Country_data_Uruguay"] = 29000, ["Country_data_Uzbekistan"] = 21000, ["Country_data_VEN"] = 16000, ["Country_data_VIE"] = 6300, ["Country_data_Vanuatu"] = 5000, ["Country_data_Vatican_City"] = 2300, ["Country_data_Venezuela"] = 33000, ["Country_data_Vietnam"] = 23000, ["Country_data_Virginia"] = 2900, ["Country_data_WAL"] = 17000, ["Country_data_Wales"] = 34000, ["Country_data_Washington"] = 3400, ["Country_data_Washington,_D.C."] = 2200, ["Country_data_Washington_(state)"] = 3700, ["Country_data_West_Germany"] = 24000, ["Country_data_West_Indies"] = 2600, ["Country_data_Wisconsin"] = 5300, ["Country_data_YUG"] = 9700, ["Country_data_Yemen"] = 7700, ["Country_data_Yugoslavia"] = 18000, ["Country_data_ZAF"] = 4700, ["Country_data_ZAM"] = 3200, ["Country_data_ZIM"] = 8200, ["Country_data_Zambia"] = 9600, ["Country_data_Zimbabwe"] = 18000, ["Country_flagbio"] = 27000, ["Country_name"] = 23000, ["Country_showdata"] = 6100, ["Country_topics"] = 22000, ["County"] = 6500, ["County_(judet)_of_Romania"] = 3300, ["Course_assignment"] = 4200, ["Course_details"] = 6200, ["Course_instructor"] = 2400, ["Cquote"] = 37000, ["Cr"] = 4300, ["Cr-rt"] = 2100, ["Create_taxonomy/link"] = 107000, ["Cref2"] = 2300, ["Cricinfo"] = 24000, ["Cricketarchive"] = 3000, ["Crime_opentask"] = 48000, ["Croatian_Census_2011"] = 2100, ["Cross"] = 3200, ["Crossreference"] = 2500, ["Crossreference/styles.css"] = 2500, ["Csv"] = 3000, ["Ct"] = 12000, ["Curlie"] = 6700, ["Currency"] = 3500, ["Current_events"] = 8200, ["Current_events/styles.css"] = 8200, ["Currentdate"] = 22000, ["Cvt"] = 102000, ["Cycling_Archives"] = 4300, ["Cycling_archives"] = 2500, ["Cycling_data_LTS"] = 2100, ["Cycling_team_link"] = 12000, ["Module:CFB_schedule"] = 26000, ["Module:CallAssert"] = 242000, ["Module:CanElecResTopTest"] = 5700, ["Module:CanadaByProvinceCatNav"] = 9800, ["Module:Cat_main"] = 198000, ["Module:Catalog_lookup_link"] = 514000, ["Module:Category_described_in_year"] = 5700, ["Module:Category_described_in_year/conf"] = 5700, ["Module:Category_handler"] = 4410000, ["Module:Category_handler/blacklist"] = 4410000, ["Module:Category_handler/config"] = 4410000, ["Module:Category_handler/data"] = 4410000, ["Module:Category_handler/shared"] = 4410000, ["Module:Category_more_if_exists"] = 41000, ["Module:Category_pair"] = 6100, ["Module:Category_see_also"] = 39000, ["Module:Celestial_object_quadrangle"] = 2300, ["Module:Check_DYK_hook"] = 114000, ["Module:Check_for_clobbered_parameters"] = 1210000, ["Module:Check_for_deprecated_parameters"] = 59000, ["Module:Check_for_unknown_parameters"] = 18200000, ["Module:Check_isxn"] = 481000, ["Module:Check_winner_by_scores"] = 13000, ["Module:Checkuser"] = 75000, ["Module:Chem2"] = 4700, ["Module:Chem2/styles.css"] = 4700, ["Module:Citation/CS1"] = 5560000, ["Module:Citation/CS1/COinS"] = 5560000, ["Module:Citation/CS1/Configuration"] = 5560000, ["Module:Citation/CS1/Date_validation"] = 5560000, ["Module:Citation/CS1/Identifiers"] = 5560000, ["Module:Citation/CS1/Suggestions"] = 26000, ["Module:Citation/CS1/Utilities"] = 5560000, ["Module:Citation/CS1/Whitelist"] = 5560000, ["Module:Citation/CS1/styles.css"] = 5700000, ["Module:Cite_Q"] = 43000, ["Module:Cite_iucn"] = 58000, ["Module:Cite_tweet"] = 35000, ["Module:Cite_web"] = 39000, ["Module:Clade"] = 7500, ["Module:Class"] = 9850000, ["Module:Class/definition.json"] = 9850000, ["Module:Class/styles.css"] = 9040000, ["Module:Class_mask"] = 10400000, ["Module:Clickable_button_2"] = 954000, ["Module:Collapsible_list"] = 55000, ["Module:College_color"] = 127000, ["Module:College_color/data"] = 127000, ["Module:Color_contrast"] = 497000, ["Module:Color_contrast/colors"] = 499000, ["Module:Commons_link"] = 255000, ["Module:Complex_date"] = 65000, ["Module:Convert"] = 1230000, ["Module:Convert/data"] = 1230000, ["Module:Convert/helper"] = 8400, ["Module:Convert/text"] = 1230000, ["Module:Convert/wikidata"] = 3300, ["Module:Convert/wikidata/data"] = 3300, ["Module:ConvertNumeric"] = 21000, ["Module:Convert_character_width"] = 2800, ["Module:Convert_character_width/data"] = 2800, ["Module:Coordinates"] = 1330000, ["Module:Coordinates/styles.css"] = 1330000, ["Module:Copied"] = 18000, ["Module:Count_banners"] = 47000, ["Module:CountryAdjectiveDemonym"] = 44000, ["Module:CountryAdjectiveDemonym/Adjectives"] = 44000, ["Module:CountryAdjectiveDemonym/Demonyms"] = 44000, ["Module:CountryAdjectiveDemonym/The"] = 44000, ["Module:CountryData"] = 142000, ["Module:CountryData/cacheA"] = 12000, ["Module:CountryData/cacheB"] = 8200, ["Module:CountryData/cacheC"] = 12000, ["Module:CountryData/cacheD"] = 4500, ["Module:CountryData/cacheE"] = 2800, ["Module:CountryData/cacheF"] = 2600, ["Module:CountryData/cacheG"] = 2700, ["Module:CountryData/summary"] = 142000, ["Module:Country_adjective"] = 4300, ["Module:Country_alias"] = 51000, ["Module:Country_alias/data"] = 51000, ["Module:Currency"] = 3600, ["Module:Currency/Presentation"] = 3600, } a09e51262a315f683a92a48d27fa16abbb02e956 Module:Transclusion count/data/N 828 924 1839 2023-07-09T05:12:16Z wikipedia>Ahechtbot 0 [[Wikipedia:BOT|Bot]]: Updated page. Scribunto text/plain return { ["N"] = 16000, ["N.b."] = 2200, ["N/A"] = 24000, ["N/a"] = 54000, ["NA-Class"] = 14000, ["NASTRO_comment"] = 30000, ["NBA_Draft_template_list"] = 3400, ["NBA_Year"] = 5600, ["NBA_color"] = 3600, ["NBA_color_cell"] = 4300, ["NBA_color_cell2"] = 3400, ["NBA_player_statistics_legend"] = 4300, ["NBA_player_statistics_start"] = 3800, ["NBbox"] = 3400, ["NCAA_color_cell"] = 9700, ["NCAA_secondary_color_cell"] = 4200, ["NCES_District_ID"] = 2600, ["NED"] = 9600, ["NEXTYEAR"] = 7900, ["NFLAltPrimaryStyle"] = 5800, ["NFLPrimaryColor"] = 2200, ["NFLPrimaryStyle"] = 28000, ["NFLSecondaryColor"] = 19000, ["NFL_Roster_navbox_template_list"] = 2600, ["NFL_Year"] = 23000, ["NFL_predraft"] = 5900, ["NFL_predraft/check"] = 5900, ["NFL_predraft/ftin"] = 5900, ["NFLplayer"] = 2100, ["NFT"] = 6800, ["NFT_player"] = 30000, ["NGA"] = 3200, ["NGR"] = 2300, ["NHLE"] = 18000, ["NHLS_url"] = 2200, ["NLD"] = 11000, ["NLM_content"] = 2800, ["NOINDEX"] = 449000, ["NOMIS2011"] = 2300, ["NOR"] = 9400, ["NRDB_species"] = 6900, ["NRHP-PA"] = 2600, ["NRHPGoogleMapFootnote"] = 2500, ["NRHP_Focus"] = 76000, ["NRHP_color"] = 3700, ["NRHP_date_for_lists"] = 3100, ["NRHP_date_for_lists/dates"] = 3100, ["NRHP_header"] = 3300, ["NRHP_navigation_box"] = 8300, ["NRHP_row"] = 3400, ["NRHP_style"] = 70000, ["NRHP_url"] = 29000, ["NRHP_url/core"] = 31000, ["NRISref"] = 73000, ["NSWcity"] = 2100, ["NSWcity/core"] = 2100, ["NUMBEROFSECTIONS"] = 4100, ["NYCS_br"] = 2700, ["NYCS_time_2"] = 3100, ["NZL"] = 6700, ["NZ_electorate_link"] = 2300, ["Na"] = 2400, ["Nac"] = 2700, ["Namespace_detect"] = 569000, ["Namespace_detect_showall"] = 10000, ["Nastaliq"] = 10000, ["Nat_fs_end"] = 2400, ["National_Film_Awards/style"] = 2000, ["National_Heritage_List_for_England"] = 22000, ["National_Rail_style"] = 5700, ["National_Register_of_Historic_Places"] = 29000, ["National_Register_of_Historic_Places_in_Massachusetts"] = 4400, ["National_Register_of_Historic_Places_in_New_York"] = 5600, ["National_Register_of_Historic_Places_in_North_Carolina"] = 2900, ["National_Register_of_Historic_Places_in_Pennsylvania"] = 3200, ["National_Register_of_Historic_Places_in_Virginia"] = 3100, ["National_basketball_squad"] = 3300, ["National_field_hockey_squad"] = 4000, ["National_football_squad_end"] = 2900, ["National_football_squad_start/styles.css"] = 2400, ["National_rugby_union_team"] = 3600, ["National_squad"] = 41000, ["National_squad_no_numbers"] = 17000, ["Native_name"] = 17000, ["Native_name_checker"] = 81000, ["Naval"] = 2900, ["Naval/core"] = 2900, ["Navbar"] = 39000, ["Navbar-collapsible"] = 3600, ["Navbar-header"] = 16000, ["Navbar-header/styles.css"] = 16000, ["Navbox"] = 3060000, ["Navbox_GR_munic"] = 3500, ["Navbox_Musical_artist"] = 9800, ["Navbox_bottom"] = 15000, ["Navbox_decade_list"] = 11000, ["Navbox_ice_hockey"] = 3100, ["Navbox_musical_artist"] = 220000, ["Navbox_musical_artist/color"] = 220000, ["Navbox_rugby_league_squad"] = 4900, ["Navbox_season_by_team"] = 3100, ["Navbox_top"] = 15000, ["Navbox_with_collapsible_groups"] = 131000, ["Navbox_with_collapsible_sections"] = 2300, ["Navbox_with_columns"] = 24000, ["Navboxes"] = 55000, ["Navboxes_colour"] = 5200, ["Navseasoncats"] = 480000, ["Navseasoncats_with_centuries_below_decade"] = 6700, ["Navseasoncats_with_decades_below_year"] = 18000, ["Navsource"] = 2500, ["Navy"] = 19000, ["Navy/core"] = 19000, ["Nay"] = 19000, ["Nbay"] = 5600, ["Nbsp"] = 483000, ["Nbsp_to_space"] = 20000, ["Ndash"] = 20000, ["Nee"] = 9200, ["NeilBrownPlayers"] = 3100, ["New_user_bar"] = 57000, ["Newbot"] = 4200, ["Next_period"] = 21000, ["Nfly"] = 2200, ["Nihongo"] = 102000, ["Nihongo2"] = 12000, ["Nihongo_foot"] = 2600, ["No"] = 8400, ["No."] = 14000, ["No2"] = 10000, ["NoSpam"] = 3900, ["NoSpamEmail"] = 17000, ["No_col_break"] = 2300, ["No_col_break/styles.css"] = 2300, ["No_footnotes"] = 51000, ["No_ping"] = 377000, ["No_plot"] = 6100, ["No_redirect"] = 570000, ["No_spam"] = 305000, ["No_wrap"] = 2400, ["Nobold"] = 384000, ["Nobold/styles.css"] = 384000, ["Nobr"] = 4800, ["Nobreak"] = 28000, ["Nochange"] = 2400, ["Noindex"] = 4800, ["Noitalic"] = 4500, ["Noitalic/styles.css"] = 4500, ["Nom"] = 40000, ["Nominated"] = 7200, ["Non-English-language_text_category"] = 2600, ["Non-admin_closure"] = 2900, ["Non-diffusing_subcategory"] = 14000, ["Non-free_2D_art"] = 7200, ["Non-free_3D_art"] = 2500, ["Non-free_album_cover"] = 203000, ["Non-free_audio_sample"] = 8400, ["Non-free_biog-pic"] = 25000, ["Non-free_book_cover"] = 55000, ["Non-free_character"] = 2300, ["Non-free_comic"] = 11000, ["Non-free_fair_use"] = 17000, ["Non-free_fair_use_in"] = 14000, ["Non-free_film_poster"] = 24000, ["Non-free_film_screenshot"] = 5000, ["Non-free_game_cover"] = 7600, ["Non-free_game_screenshot"] = 4700, ["Non-free_historic_image"] = 16000, ["Non-free_image_data"] = 8600, ["Non-free_image_rationale"] = 9700, ["Non-free_logo"] = 162000, ["Non-free_magazine_cover"] = 7700, ["Non-free_media"] = 732000, ["Non-free_media_data"] = 9800, ["Non-free_media_rationale"] = 11000, ["Non-free_movie_poster"] = 23000, ["Non-free_newspaper_image"] = 2000, ["Non-free_poster"] = 80000, ["Non-free_promotional"] = 8800, ["Non-free_school_logo"] = 2400, ["Non-free_seal"] = 4500, ["Non-free_symbol"] = 6100, ["Non-free_television_screenshot"] = 16000, ["Non-free_title-card"] = 5700, ["Non-free_use_rationale"] = 462000, ["Non-free_use_rationale/styles.css"] = 684000, ["Non-free_use_rationale_2"] = 212000, ["Non-free_use_rationale_album_cover"] = 136000, ["Non-free_use_rationale_book_cover"] = 19000, ["Non-free_use_rationale_logo"] = 94000, ["Non-free_use_rationale_poster"] = 52000, ["Non-free_use_rationale_title-card"] = 2800, ["Non-free_use_rationale_video_cover"] = 5800, ["Non-free_use_rationale_video_game_cover"] = 10000, ["Non-free_video_cover"] = 16000, ["Non-free_video_game_cover"] = 21000, ["Non-free_video_game_cover/platform"] = 21000, ["Non-free_video_game_screenshot"] = 10000, ["Non-free_video_game_screenshot/platform"] = 9600, ["Non-free_with_NC"] = 2700, ["Non-free_with_permission"] = 2100, ["Nonspecific"] = 2200, ["Nonumtoc"] = 2700, ["Nonumtoc/styles.css"] = 2700, ["Noping"] = 367000, ["Noprint"] = 2900, ["Noredirect"] = 8300, ["Normal"] = 5900, ["Normalwraplink"] = 3500, ["NorthAmNative"] = 2000, ["North_America_topic"] = 3500, ["Northern_Ireland_tasks"] = 20000, ["Nospam"] = 21000, ["Not-PD-US-expired-min-year"] = 26000, ["Not_a_ballot"] = 7700, ["Not_a_forum"] = 7700, ["Not_a_typo"] = 11000, ["Not_around"] = 2900, ["Not_done"] = 20000, ["Notability"] = 63000, ["Notavote"] = 2100, ["Notdone"] = 5500, ["Note"] = 25000, ["NoteFoot"] = 4100, ["NoteTag"] = 4100, ["Note_label"] = 9100, ["Notelist"] = 185000, ["Notelist-lr"] = 3500, ["Notelist-ua"] = 6800, ["Notes"] = 6000, ["Noteslist"] = 3700, ["Notice"] = 113000, ["NovelsWikiProject"] = 19000, ["Nowiki_="] = 2300, ["Nowrap"] = 838000, ["Np"] = 2900, ["Npby"] = 2500, ["Nq"] = 3700, ["Nrut"] = 3600, ["Ns"] = 2700, ["Ns0"] = 108000, ["Ns_has_subpages"] = 2190000, ["Nts"] = 20000, ["Ntsh"] = 3300, ["Number_of_defined_parameters"] = 4800, ["Number_table_sorting"] = 35000, ["Number_table_sorting_hidden"] = 3300, ["Number_to_word"] = 7300, ["Numero"] = 3600, ["Nutshell"] = 3900, ["Nw="] = 2300, ["Née"] = 2000, ["Module:NUMBEROFSECTIONS"] = 4100, ["Module:Namespace_detect"] = 16000000, ["Module:Namespace_detect/config"] = 17100000, ["Module:Namespace_detect/data"] = 17100000, ["Module:National_squad"] = 54000, ["Module:Native_name"] = 92000, ["Module:Navbar"] = 5420000, ["Module:Navbar/configuration"] = 5420000, ["Module:Navbar/styles.css"] = 4780000, ["Module:Navbox"] = 4430000, ["Module:Navbox/configuration"] = 4430000, ["Module:Navbox/styles.css"] = 4430000, ["Module:Navbox_ice_hockey"] = 3100, ["Module:Navbox_top_and_bottom"] = 15000, ["Module:Navbox_with_collapsible_groups"] = 139000, ["Module:Navboxes"] = 56000, ["Module:Navseasoncats"] = 480000, ["Module:Nihongo"] = 104000, ["Module:No_ping"] = 448000, ["Module:Noinclude"] = 21000, ["Module:Ns_has_subpages"] = 2190000, ["Module:Number_table_sorting"] = 37000, } f30fe9f5749b2426243f9520857276ca1f5e968d 海底小纵队(消歧义) 0 6 163 57 2023-07-14T17:56:20Z Richard Robin 2 wikitext text/x-wiki [[文件:OCTONAUTS.png|300px|居中]] 海底小纵队(Octonauts),可被解释为多篇文章: *如果你正在寻找由[[巴克队长]]为领导组成的团队,请进入[[海底小纵队(团队)]]。 *如果您在寻找《海底小纵队》绘本图书的介绍,请进入[[海底小纵队(原作绘本)]]。 *如果您在寻找《海底小纵队》动画剧集的介绍,请进入[[海底小纵队(动画剧集)]]。 **如果您在寻找《海底小纵队》动画剧集第一部的介绍,请进入[[海底小纵队动画(第一季)]]。 **如果您在寻找《海底小纵队》动画剧集第二部的介绍,请进入[[海底小纵队动画(第二季)]]。 **如果您在寻找《海底小纵队》动画剧集第三部的介绍,请进入[[海底小纵队动画(第三季)]]。 **如果您在寻找《海底小纵队》动画剧集第四部的介绍,请进入[[海底小纵队动画(第四季)]]。 **如果您在寻找《海底小纵队》动画剧集第五部的介绍,请进入[[海底小纵队动画(第五季)]]。 **如果您在寻找《海底小纵队》动画剧集第六部的介绍,请进入[[海底小纵队动画(第六季)]]。 **如果您在寻找《海底小纵队》动画剧集第七部的介绍,请进入[[海底小纵队动画(第七季)]]。 **如果您在寻找《海底小纵队》动画剧集第八部的介绍,请进入[[海底小纵队动画(第八季)]]。 *如果您在寻找已于2021年在中国上映的电影的介绍,请进入[[海底小纵队大电影1:火焰之环]]。 *如果您在寻找已于2022年在中国上映的电影的介绍,请进入[[海底小纵队大电影2:洞穴大冒险]]。 7a7141015f7439c3423d8f62da1e7e5624a0719a File:海底小纵队第八季暑期首批播出安排.jpg 6 108 165 2023-07-14T18:15:21Z Richard Robin 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Template:首页/最新动态 10 103 166 154 2023-07-14T18:16:05Z Richard Robin 2 更新内容 wikitext text/x-wiki [[File:海底小纵队第八季暑期首批播出安排.jpg|center|530px|link=https://weibo.com/5184055512/M87dZnnaA?pagetype=profilefeed]] b962aac894503e65bfc3c8b7bb5f251efa092b40 183 166 2023-07-15T11:53:11Z Richard Robin 2 wikitext text/x-wiki [[File:海底小纵队第8季横幅.jpg|530px|center]] [[File:海底小纵队第八季暑期首批播出安排.jpg|center|530px|link=https://weibo.com/5184055512/M87dZnnaA?pagetype=profilefeed]] <sub>下标文本</sub> 19a4e663813e6e9a8edaa0f967dd5364cb842607 185 183 2023-07-15T12:12:10Z Richard Robin 2 链接 wikitext text/x-wiki [[File:海底小纵队第8季横幅.jpg|530px|center]] [[File:海底小纵队第八季暑期首批播出安排.jpg|center|530px|link=https://weibo.com/5184055512/N8MC7ozBh?pagetype=profilefeed]] f3bef9a2aa152926135a12b89c53e9e09e8e36ed File:海底小纵队第8季横幅.jpg 6 109 167 2023-07-14T18:18:25Z Richard Robin 2 海底小纵队第8季横幅 wikitext text/x-wiki == 摘要 == 海底小纵队第8季横幅 26efea94dc1397b2d78e4c6125b397c0cf6d1b69 首页 0 2 168 162 2023-07-14T18:19:53Z Richard Robin 2 增加第八季相关内容(愿意参与编辑的人太少了好累) wikitext text/x-wiki <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div> [[File:海底小纵队第8季横幅.jpg|thumb|921x921px]] <br> {| summary= style="width:100%;table-layout: fixed;" cellpadding="4px" | |- valign=top style="table-layout:fixed" | <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="clear:both"></div> | valign="top" width="370px"|<div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> {{首页/工程}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> {{首页/相关链接}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> |} 9dda7a08a9eb8678426a7db0e7e700918764dfdd 169 168 2023-07-14T18:21:16Z Richard Robin 2 wikitext text/x-wiki <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div> [[File:海底小纵队第8季横幅.jpg|thumb|921x921px]] <br> {| class="wikitable mw-collapsible mw-collapsed" summary="style=&quot;width:100%;table-layout:" cellpadding="4px" fixed;" | |- valign=top style="table-layout:fixed" | <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="clear:both"></div> | valign="top" width="370px"|<div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> {{首页/工程}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> {{首页/相关链接}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> |} 0ca188070900922b158866e526a98eeba656f859 170 169 2023-07-14T18:24:32Z Richard Robin 2 wikitext text/x-wiki <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div> <br> {| class="wikitable" summary="style=&quot;width:100%;table-layout:" cellpadding="4px" fixed;" | | colspan="2" |[[File:海底小纵队第8季横幅.jpg|926x926像素|center|frameless]] |- valign=top style="table-layout:fixed" | <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="clear:both"></div> | valign="top" width="370px"|<div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> {{首页/工程}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> {{首页/相关链接}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> |} 6c11bfd01915e50bcf1d68ca5345c8430e24c555 171 170 2023-07-14T18:26:11Z Richard Robin 2 wikitext text/x-wiki {| class="wikitable" summary="style=&quot;width:100%;table-layout:" cellpadding="4px" fixed;" | | colspan="2" |<center><div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div></center> |- | colspan="2" |[[File:海底小纵队第8季横幅.jpg|926x926像素|center|frameless]] |- valign=top style="table-layout:fixed" | <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="clear:both"></div> | valign="top" width="370px"|<div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> {{首页/工程}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> {{首页/相关链接}}</div><br> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> |} a11a8f014134cb8c0354abed9d90926771e212da 174 171 2023-07-15T11:32:38Z Richard Robin 2 wikitext text/x-wiki <center><div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div></center> [[File:海底小纵队第8季横幅.jpg|919x919像素|center|frameless]] <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> {{首页/工程}}</div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> {{首页/相关链接}}</div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> f506029323a5bdbfe8cf6ca6ae562e6605002f38 176 174 2023-07-15T11:42:29Z Richard Robin 2 wikitext text/x-wiki <center><div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div></center> [[File:海底小纵队第8季横幅.jpg|919x919像素|center|frameless]] <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> {{首页/工程}}</div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> <center>{{首页/相关链接}} </center> </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> 352d44febf236a3509220550ada0aa6cfc9381bb 177 176 2023-07-15T11:43:15Z Richard Robin 2 移动版适配 wikitext text/x-wiki <center><div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div></center> [[File:海底小纵队第8季横幅.jpg|919x919像素|center|frameless]] <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> <center>{{首页/工程}}</center> </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> <center>{{首页/相关链接}}</center> </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> d2bafde958eab87075cf41b13cfbcd53a79ce904 181 177 2023-07-15T11:51:16Z Richard Robin 2 wikitext text/x-wiki <center><div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div></center> [[File:海底小纵队第8季横幅.jpg|919x919像素|center|frameless]] <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> {{首页/工程}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> {{首页/相关链接}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> 54c8dbfcb1a586e9344c5a4092d7e0d75926973e 182 181 2023-07-15T11:51:57Z Richard Robin 2 wikitext text/x-wiki <center><div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div></center> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> {{首页/工程}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> {{首页/相关链接}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> d86794802a85e9cad44b9421af4cad89033bb35e MediaWiki:Sidebar 8 110 172 2023-07-14T18:43:41Z Richard Robin 2 增加“相关链接”侧边栏板块 wikitext text/x-wiki * navigation ** mainpage|mainpage-description ** recentchanges-url|recentchanges ** randompage-url|randompage ** helppage|help-mediawiki * SEARCH * 相关链接 ** https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196|中文官网 ** https://www.theoctonauts.com/|英文官网 ** https://tieba.baidu.com/海底小纵队|贴吧 ** https://weibo.com/u/5184055512|微博 ** https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index|超话 ** https://space.bilibili.com/1057641912|哔哩哔哩 ** https://twitter.com/Octonauts|推特 ** https://www.facebook.com/octonauts|脸书 ** https://www.youtube.com/c/Octonauts|YouTube * TOOLBOX * LANGUAGES 0534840c9ff4f6817198857cc8e989a9ee13db61 173 172 2023-07-14T18:48:16Z Richard Robin 2 wikitext text/x-wiki * navigation ** mainpage|mainpage-description ** recentchanges-url|recentchanges ** randompage-url|randompage ** helppage|help-mediawiki * SEARCH * 相关链接 ** https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | 中文官网 ** https://www.theoctonauts.com | 英文官网 ** https://tieba.baidu.com/海底小纵队 | 贴吧 ** https://weibo.com/u/5184055512 | 微博 ** https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index | 超话 ** https://space.bilibili.com/1057641912 | 哔哩哔哩 ** https://twitter.com/Octonauts | 推特 ** https://www.facebook.com/octonauts | 脸书 ** https://www.youtube.com/c/Octonauts | YouTube * TOOLBOX * LANGUAGES d1c16bd2333661a9a4725ed150d23e83a1877c31 187 173 2023-07-15T15:47:51Z Richard Robin 2 增加“沙盒” wikitext text/x-wiki * navigation ** mainpage|mainpage-description ** recentchanges-url|recentchanges ** randompage-url|randompage ** 海底小纵队维基:沙盒|沙盒 ** helppage|help-mediawiki * SEARCH * 相关链接 ** https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | 中文官网 ** https://www.theoctonauts.com | 英文官网 ** https://tieba.baidu.com/海底小纵队 | 贴吧 ** https://weibo.com/u/5184055512 | 微博 ** https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index | 超话 ** https://space.bilibili.com/1057641912 | 哔哩哔哩 ** https://twitter.com/Octonauts | 推特 ** https://www.facebook.com/octonauts | 脸书 ** https://www.youtube.com/c/Octonauts | YouTube * TOOLBOX * LANGUAGES 567bfc992fa0c5d344aa8208bd201868110bfbc2 Template:首页/相关链接 10 99 175 157 2023-07-15T11:41:14Z Richard Robin 2 测试 wikitext text/x-wiki {| |+ <center>更多内容您可以访问<center/> |- | <center>[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站]</center> || <center>[https://www.theoctonauts.com 海底小纵队英文官方网站]</center> || <center>[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基]</center> || <center>[https://weibo.com/u/5184055512 海底小纵队官方微博]</center> || <center>[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话]</center> |- | <center>[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧]</center> || <center>[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩]</center> || <center>[https://www.facebook.com/octonauts 海底小纵队官方脸书]</center> || <center>[https://twitter.com/Octonauts 海底小纵队官方推特]</center> || <center>[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube]</center> |} 77fa5f71bc2e9d93cf8370acf452a0de7514ef86 178 175 2023-07-15T11:47:18Z Richard Robin 2 更适配手机端 wikitext text/x-wiki {| |+ <center>更多内容您可以访问<center/> |- | <center>[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王网站]</center> || <center>[https://www.theoctonauts.com 英文官方网站]</center> || <center>[https://octonauts.fandom.com/wiki/Octonauts_Wiki 英文维基]</center> || <center>[https://weibo.com/u/5184055512 官方微博]</center> || <center>[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 微博超话]</center> |- | <center>[https://tieba.baidu.com/海底小纵队 百度贴吧]</center> || <center>[https://space.bilibili.com/1057641912 官方哔哩哔哩]</center> || <center>[https://www.facebook.com/octonauts 官方脸书]</center> || <center>[https://twitter.com/Octonauts 官方推特]</center> || <center>[https://www.youtube.com/c/Octonauts 官方YouTube]</center> |} 7c5bb37536b7282950cb650b4d605fb9d9959562 179 178 2023-07-15T11:50:20Z Richard Robin 2 撤销[[Special:Contributions/Richard Robin|Richard Robin]]([[User talk:Richard Robin|讨论]])的版本178 wikitext text/x-wiki {| |+ <center>更多内容您可以访问<center/> |- | <center>[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站]</center> || <center>[https://www.theoctonauts.com 海底小纵队英文官方网站]</center> || <center>[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基]</center> || <center>[https://weibo.com/u/5184055512 海底小纵队官方微博]</center> || <center>[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话]</center> |- | <center>[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧]</center> || <center>[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩]</center> || <center>[https://www.facebook.com/octonauts 海底小纵队官方脸书]</center> || <center>[https://twitter.com/Octonauts 海底小纵队官方推特]</center> || <center>[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube]</center> |} 77fa5f71bc2e9d93cf8370acf452a0de7514ef86 180 179 2023-07-15T11:50:40Z Richard Robin 2 撤销[[Special:Contributions/Richard Robin|Richard Robin]]([[User talk:Richard Robin|讨论]])的版本175 wikitext text/x-wiki 更多内容您可以访问: *[https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 万达宝贝王海底小纵队网站] *[https://www.theoctonauts.com 海底小纵队英文官方网站] *[https://octonauts.fandom.com/wiki/Octonauts_Wiki 海底小纵队英文维基] *[https://weibo.com/u/5184055512 海底小纵队官方微博] *[https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index 海底小纵队微博超话] *[https://tieba.baidu.com/海底小纵队 海底小纵队百度贴吧] *[https://space.bilibili.com/1057641912 海底小纵队官方哔哩哔哩] *[https://www.facebook.com/octonauts 海底小纵队官方脸书] *[https://twitter.com/Octonauts 海底小纵队官方推特] *[https://www.youtube.com/c/Octonauts 海底小纵队官方YouTube] 4b27ed214a22594ae2290191eaf2011dedbbaccf 海底小纵队维基:关于 4 11 184 23 2023-07-15T12:02:06Z Richard Robin 2 补充版权方面的声明 wikitext text/x-wiki [[文件:海底小纵队维基LOGO.png|300px|居中]] 海底小纵队维基,基于Miraheze的意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素的网站。 该网站的部分内容可能会从[https://octonauts.fandom.com/wiki/Octonauts%20Wiki 海底小纵队英文维基] 或其他网站摘录、翻译,若摘录的内容侵犯到您的权益,您可以立刻联系我们并要求删除侵权内容。 本网站的原创内容默认基于[https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 3ecd674a461b3bb7260aadd2fad3da32d916c3ec 章教授 0 53 186 72 2023-07-15T14:04:46Z Richard Robin 2 资料卡 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>章教授</big><br>Professor Inkling | image = Profinkling.png | width = 300px | bgcolor = #ffb0b0 | subtitle = }} {{Simpleboxdata|label=性别|data=男}} {{Simpleboxdata|label=物种|data=章鱼}} {{Simpleboxdata|label=颜色|data=粉红色}} {{Simpleboxdata|label=职业|data=创始人、教授、海洋学家}} {{Simpleboxdata|label=居住地|data=[[章鱼堡]]}} {{Simpleboxdata|label=初次露面|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>[[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=[[海底小纵队动画(第八季)]]}} {{Simpleboxdata|label=配音演员|data=Keith Wickham}} |} 章教授(Professor Inkling)是[[海底小纵队(团队)|海底小纵队]]的创始人。 == 资料 == *性别:男 *物种:小飞象章鱼 *年龄:未知 *职务:海洋学家 和 创始人 *别称:教授、小章、老章 关系:海底小纵队成员、喷喷(侄子)、欧文(表哥) == 介绍 == 章教授是一只小飞象章鱼,左眼带着单片眼镜,很爱读书,见多识广。有喷墨汁的技能。 不常走动,当队员们出去执行任务的时候,会待在基地负责联络工作。他有一个大图书馆,里面有很多很多的书,章教授几乎一整天都呆在图书馆里。章教授还有很多很多的亲戚。另外,章教授也是小队中最年长的一个,是海底小纵队的创始人。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:章鱼]] 7c68c4395be9aebbc266a61cdf7e8a67d32fed8f Template:Mbox 10 835 1628 1627 2023-07-15T16:40:34Z Richard Robin 2 导入1个版本 wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> c262e205f85f774a23f74119179ceea11751d68e Template:Documentation 10 18 1630 1629 2023-07-15T16:40:35Z Richard Robin 2 导入1个版本 wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>[[Category:Templates]]</noinclude> 9885bb4fa99bf3d5b960e73606bbb8eed3026877 Template:Documentation subpage 10 836 1632 1631 2023-07-15T16:40:35Z Richard Robin 2 导入1个版本 wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = '''This is a documentation subpage''' for '''{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.<br/> It contains usage information, [[mw:Help:Categories|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} | page}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 471e685c1c643a5c6272e20e49824fffebad0448 Module:Arguments 828 837 1634 1633 2023-07-15T16:40:36Z Richard Robin 2 导入1个版本 Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Documentation 828 838 1636 1635 2023-07-15T16:40:36Z Richard Robin 2 导入1个版本 Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink, purgeLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 78cc3a78f2b5dbb267fa16027c0800a22dbd3c42 Module:Documentation/config 828 839 1638 1637 2023-07-15T16:40:37Z Richard Robin 2 导入1个版本 Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[w:Wikipedia:Template documentation|documentation]] is [[mw:Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[mw:Extension:Scribunto/Lua reference manual|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg d70e8b1402a2bbe08a1fef4b75d743e661af0c95 Module:Documentation/styles.css 828 840 1640 1639 2023-07-15T16:40:37Z Richard Robin 2 导入1个版本 sanitized-css text/css .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } /* [[Category:Template stylesheets]] */ 5fb984fe8632dc068db16853a824c9f3d5175dd9 Template:Template link 10 841 1642 1641 2023-07-15T16:40:37Z Richard Robin 2 导入1个版本 wikitext text/x-wiki &#123;&#123;[[Template:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> eabbec62efe3044a98ebb3ce9e7d4d43c222351d Template:Template link expanded 10 842 1644 1643 2023-07-15T16:40:38Z Richard Robin 2 导入1个版本 wikitext text/x-wiki <code><nowiki>{{</nowiki>{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}<!-- -->[[{{{sister|{{{SISTER|}}}}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!-- -->{{#if:{{{2|}}} |&#124;{{{2}}}}}<!-- -->{{#if:{{{3|}}} |&#124;{{{3}}}}}<!-- -->{{#if:{{{4|}}} |&#124;{{{4}}}}}<!-- -->{{#if:{{{5|}}} |&#124;{{{5}}}}}<!-- -->{{#if:{{{6|}}} |&#124;{{{6}}}}}<!-- -->{{#if:{{{7|}}} |&#124;{{{7}}}}}<!-- -->{{#if:{{{8|}}} |&#124;{{{8}}}}}<!-- -->{{#if:{{{9|}}} |&#124;{{{9}}}}}<!-- -->{{#if:{{{10|}}} |&#124;{{{10}}}}}<!-- -->{{#if:{{{11|}}} |&#124;{{{11}}}}}<!-- -->{{#if:{{{12|}}} |&#124;{{{12}}}}}<!-- -->{{#if:{{{13|}}} |&#124;{{{13}}}}}<!-- -->{{#if:{{{14|}}} |&#124;{{{14}}}}}<!-- -->{{#if:{{{15|}}} |&#124;{{{15}}}}}<!-- -->{{#if:{{{16|}}} |&#124;{{{16}}}}}<!-- -->{{#if:{{{17|}}} |&#124;{{{17}}}}}<!-- -->{{#if:{{{18|}}} |&#124;{{{18}}}}}<!-- -->{{#if:{{{19|}}} |&#124;{{{19}}}}}<!-- -->{{#if:{{{20|}}} |&#124;{{{20}}}}}<!-- -->{{#if:{{{21|}}} |&#124;''...''}}<!-- --><nowiki>}}</nowiki></code><noinclude> {{Documentation}} </noinclude> 9f670205d4b358df089b1a820f78f02a88afca3a Template:Tl 10 32 1646 1645 2023-07-15T16:40:38Z Richard Robin 2 导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:Template link]] fb9a6b420e13178e581af6e7d64274cd30a79017 Template:Tlx 10 843 1648 1647 2023-07-15T16:40:38Z Richard Robin 2 导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] 155e901040104f96908f1f4627c4eb3501301bf9 Template:Clear 10 844 1650 1649 2023-07-15T16:40:39Z Richard Robin 2 导入1个版本 wikitext text/x-wiki <div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude> 38bab3e3d7fbd3d6800d46556e60bc6bac494d72 Module:Message box 828 845 1652 1651 2023-07-15T16:40:39Z Richard Robin 2 导入1个版本 Scribunto text/plain -- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary modules. require('Module:No globals') local getArgs local yesno = require('Module:Yesno') local templatestyles = 'Module:Message box/styles.css' -- Get a language object for formatDate and ucfirst. local lang = mw.language.getContentLanguage() -- Define constants local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {user = 'tmbox', talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date) end self.info = args.info end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell if cfg.imageEmptyCellStyle then self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px' end -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):css('width', '52px') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') :cssText(self.imageEmptyCellStyle or nil) end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) and not self.isSmall then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):css('width', '52px') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :css('text-align', 'center') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end local function templatestyles(frame, src) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = templatestyles} } .. 'CONFIG_MODULE' end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) be00cd389f9f2afcd361e5d5e33622839555cbd9 Module:Message box/configuration 828 846 1654 1653 2023-07-15T16:40:40Z Richard Robin 2 导入1个版本 Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix'}, }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, imageEmptyCellStyle = true, templateCategory = 'Talk message boxes' } } c6bd9191861b23e474e12b19c694335c4bc3af5f Module:No globals 828 847 1656 1655 2023-07-15T16:40:40Z Richard Robin 2 导入1个版本 Scribunto text/plain local mt = getmetatable(_G) or {} function mt.__index (t, k) if k ~= 'arg' then error('Tried to read nil global ' .. tostring(k), 2) end return nil end function mt.__newindex(t, k, v) if k ~= 'arg' then error('Tried to write global ' .. tostring(k), 2) end rawset(t, k, v) end setmetatable(_G, mt) 8ce3969f7d53b08bd00dabe4cc9780bc6afd412a Module:Yesno 828 848 1658 1657 2023-07-15T16:40:41Z Richard Robin 2 导入1个版本 Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Template:Mbox/doc 10 849 1660 1659 2023-07-15T16:40:41Z Richard Robin 2 导入1个版本 wikitext text/x-wiki {{Documentation subpage}} <!-- Please add categories to the /doc subpage, and interwikis at Wikidata (see Wikipedia:Wikidata) --> {{tl|mbox}} stands '''m'''essage '''box''', which is a metatemplate used to build message boxes for other templates. It offers several different colours, images and some other features. ==Basic usage== The box below shows the most common parameters that are accepted by {{Tl|mbox}}. The purpose of each is described below. <pre style="overflow:auto;"> {{mbox | name = | small = {{{small|}}} | type = | image = | sect = {{{1|}}} | issue = | talk = {{{talk|}}} | fix = | date = {{{date|}}} | cat = | all = }} </pre> ==Full usage== The "All parameters" box shows all possible parameters for this template. However, it is not recommended to copy this, because it will never be required to use all parameters simultaneously. {| class="wikitable" align="left" style="background:transparent; width=30%;" !All parameters |- |<pre style="font-size:100%"> {{mbox | name = | small = {{{small|}}} | type = | image = | imageright = | smallimage = | smallimageright = | class = | style = | textstyle = | sect = {{{1|}}} | issue = | talk = {{{talk|}}} | fix = | date = {{{date|}}} | text = | smalltext = | plainlinks = no | removalnotice = | cat = | all = | cat2 = | all2 = | cat3 = | all3 = }} </pre> |} {{clear}} ==Common parameters== === ''name'' === The ''name'' parameter specifies the name of the template, without the Template namespace prefix. For example [[w:Template:Underlinked]] specifies {{Para|name|Underlinked}}. This parameter should be updated if the template is ever moved. The purpose of this parameter is to allow the template to have a more useful display on its template page, for example to show the date even when not specified, and to apply categorisation of the template itself. === ''small'' === The ''small'' parameter should be passed through the template, as this will allow editors to use the small format by specifying {{para|small|left}} on an article: {{mbox|nocat=true|small=left|text=This is the small left-aligned mbox format.}} Otherwise the standard format will be produced: {{mbox|nocat=true|text=This is the standard mbox format.}} Other variations: * For templates which should ''never'' be small, specify {{Para|small|no}} or do not pass the small parameter at all. * For templates which should ''always'' be small, just specify {{Para|small|left}}. * For templates which should ''default to small'', try {{para|small|<nowiki>{{{small|left}}}</nowiki>}}. This will allow an editor to override by using {{para|small|no}} on an article. To use a small box that adjusts its width to match the text, use {{para|style|width: auto; margin-right: 0px;}} and {{para|textstyle|width: auto;}} together: {{mbox|nocat=true|small=left|style=width: auto; margin-right: 0px;|textstyle=width: auto; margin-right: 0px;|text=This is the small left-aligned Ambox format with flexible width.}} See [[#Sect]] below for more information on how to limit {{para|small}} display to cases when the template is being used for a section instead of the whole article (recommended, to prevent inconsistent top-of-article display). === ''type'' === The ''type'' parameter defines the colour of the left bar, and the image that is used by default. The type is chosen not on aesthetics but is based on the type of issue that the template describes. The seven available types and their default images are shown below. {{mbox |nocat=true | type = speedy | text = type=<u>speedy</u> – Speedy deletion issues }} {{mbox |nocat=true | type = delete | text = type=<u>delete</u> – Deletion issues, }} {{mbox |nocat=true | type = content | text = type=<u>content</u> – Content issues }} {{mbox |nocat=true | type = style | text = type=<u>style</u> – Style issues }} {{mbox |nocat=true | type = notice | text = type=<u>notice</u> – Article notices {{mbox |nocat=true | type = move | text = type=<u>move</u> – Merge, split and transwiki proposals }} {{mbox |nocat=true | type = protection | text = type=<u>protection</u> – Protection notices, }} If no ''type'' parameter is given the template defaults to {{para|type|notice}}. === ''image'' === You can choose a specific image to use for the template by using the ''image'' parameter. Images are specified using the standard syntax for inserting files. Widths of 40-50px are typical. Please note: * If no image is specified then the default image corresponding to the ''type'' is used. (See [[#type]] above.) * If {{para|image|none}} is specified, then no image is used and the text uses the whole message box area. === ''sect'' === Many message templates begin with the text '''This article ...''' and it is often desirable that this wording change to '''This section ...''' if the template is used on a section instead. The value of this parameter will replace the word "article". Various possibilities for use include: {{para|sect|list}}, {{para|sect|table}}, {{para|sect|"In popular culture" material}}, etc. If using this feature, be sure to remove the first two words ("This article") from the template's text, otherwise it will be duplicated. A common way to facilitate this functionality is to pass {{para|sect|<nowiki>{{{1|}}}</nowiki>}}. This will allow editors to type <kbd>section</kbd>, for example, as the first unnamed parameter of the template to change the wording. Another approach is to pass {{para|sect|<nowiki>{{{section|{{{sect|}}}}}}</nowiki>}} to provide a named value. === ''issue'' and ''fix'' === The ''issue'' parameter is used to describe the issue with the page. Try to keep it short and to-the-point (approximately 10-20 words). The ''fix'' parameter contains some text which describes what should be done to improve the page. It may be longer than the text in ''issue'', but should not usually be more than two sentences. When the template is in its small form (when using {{para|small|left}}), the ''issue'' is the only text that will be displayed. For example [[w:Template:Citation style]] defines When used stand-alone it produces the whole text: But when used with |small=left it displays only the issue: === ''talk'' === Some message templates include a link to the talk page, and allow an editor to specify a section heading to link directly to the relevant section. To achieve this functionality, simply pass the ''talk'' parameter through, i.e. talk=<nowiki>{{{talk|}}}</nowiki> This parameter may then be used by an editor as follows: * talk=SECTION HEADING – the link will point to the specified section on the article's talk page, e.g. talk=Foo. * talk=FULL PAGE NAME – the template will link to the page specified (which may include a section anchor), e.g. talk=Talk:Banana#Foo Notes: * When this parameter is used by a template, the talk page link will appear on the template itself (in order to demonstrate the functionality) but this will only display on articles if the parameter is actually defined. * In order to make sure there is always a link to the talk page, you can use |talk=<nowiki>{{{talk|#}}}</nowiki>. * If the talk page does not exist, there will be no link, whatever the value of the parameter. === ''date'' === Passing the ''date'' parameter through to the meta-template means that the date that the article is tagged may be specified by an editor (or more commonly a bot). This will be displayed after the message in a smaller font. Passing this parameter also enables monthly cleanup categorisation when the ''cat'' parameter is also defined. === ''info'' === This parameter is for specifying additional information. Whatever you add here will appear after the date. === ''cat'' === This parameter defines a monthly cleanup category. If |cat=CATEGORY then: * articles will be placed in '''Category:CATEGORY from DATE''' if |date=DATE is specified. * articles will be placed in '''Category:CATEGORY''' if the date is not specified. For example, [[w:Template:No footnotes]] specifies |cat=Articles lacking in-text citations and so an article with the template {{Tlx|No footnotes|2=date=June 2010|SISTER=w:}} will be placed in [[w:Category:Articles lacking in-text citations from June 2010]]. The ''cat'' parameter should not be linked, nor should the prefix <code>Category:</code> be used. === ''all'' === The ''all'' parameter defines a category into which all articles should be placed. The ''all'' parameter should not be linked, nor should the prefix <code>Category:</code> be used. == Additional parameters == === ''imageright'' === An image on the right side of the message box may be specified using this parameter. The syntax is the same as for the ''image'' parameter, except that the default is no image. === ''smallimage'' and ''smallimageright'' === Images for the small format box may be specified using these parameters. They will have no effect unless {{para|small|left}} is specified. === ''class'' === Custom [[w:Cascading Style Sheets|CSS]] classes to apply to the box. If adding multiple classes, they should be space-separated. === ''style'' and ''textstyle'' === Optional CSS values may be defined, without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. * ''style'' specifies the style used by the entire message box table. This can be used to do things such as modifying the width of the box. * ''textstyle'' relates to the text cell. === ''text'' and ''smalltext'' === Instead of specifying the ''issue'' and the ''fix'' it is possible to use the ''text'' parameter instead. Customised text for the small format can be defined using ''smalltext''. === ''plainlinks'' === Normally on Wikipedia, external links have an arrow icon next to them, like this: [http://www.example.com Example.com]. However, in message boxes, the arrow icon is suppressed by default, like this: <span class="plainlinks">[http://www.example.com Example.com]</span>. To get the normal style of external link with the arrow icon, use {{para|plainlinks|no}}. === ''cat2'', ''cat3'', ''all2'', and ''all3'' === * ''cat2'' and ''cat3'' provide for additional monthly categories; see [[#cat]]. * ''all2'' and ''all3'' provide for additional categories into which all articles are placed, just like [[#all]]. == Technical notes == * If you need to use special characters in the text parameter then you need to escape them like this: <syntaxhighlight lang="xml"> {{mbox |nocat=true | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }} </syntaxhighlight> {{mbox |nocat=true | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }} * The <code>&lt;div></code> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that. * The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons. == TemplateData == <templatedata> { "params": { "1": {}, "small": { "label": "Small Mode", "description": "The small parameter should be passed through the template, as this will allow editors to use the small format by specifying |small=left on an article.", "type": "string", "suggestedvalues": [ "no", "left" ] }, "talk": {}, "date": {}, "name": { "label": "Template Name", "description": "The name parameter specifies the name of the template, without the Template namespace prefix. ", "type": "string" }, "type": {}, "image": {}, "sect": {}, "issue": {}, "fix": {}, "info": {}, "cat": {}, "all": {}, "imageright": {}, "class": {}, "text ": {}, "plainlinks": {}, "smallimage ": {}, "smallimageright": {}, "textstyle": {}, "style ": {}, "smalltext": {}, "cat2": {}, "cat3": {}, "all2": {}, "all3": {} }, "paramOrder": [ "name", "small", "type", "image", "sect", "issue", "fix", "talk", "date", "1", "info", "cat", "all", "imageright", "class", "text ", "plainlinks", "smallimage ", "smallimageright", "textstyle", "style ", "smalltext", "cat2", "cat3", "all2", "all3" ] } </templatedata> <includeonly>[[Category:Notice templates]]</includeonly> 7b00ac1be5a47eeb858d5ff75f02906ce5d85ff2 Template:Para 10 850 1662 1661 2023-07-15T16:40:42Z Richard Robin 2 导入1个版本 wikitext text/x-wiki <code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 7be5bee75307eae9342bbb9ff3a613e93e93d5a7 Template:Header 10 851 1664 1663 2023-07-15T16:42:43Z Richard Robin 2 已从[[:dev:Template:Header]]导入1个版本 wikitext text/x-wiki {| style="width: 100% !important;" |- | style="border-top: 4px solid #{{{topbarhex|6F6F6F}}}; background-color: #{{{bodyhex|F6F6F6}}}; padding: 10px 15px;" | {{#if:{{{shortcut|}}}| {{shortcut|{{{shortcut|uselang={{{uselang|{{CURRENTCONTENTLANGUAGE}}}}}}}}}}}}<div style="font-size:180%; text-align: left; color: {{{titlecolor|}}}">'''{{{title|{{{1|{{BASEPAGENAME}}}}}}}}'''</div> <div style="padding-top:0.3em; padding-bottom:0.1em; font-size:100%; text-align: left; color: {{{bodycolor|}}}">{{{notes|Put some notes here!}}}</div> |- | style="height: 10px" | |} {{clear}}<noinclude>{{documentation}}[[Category:templates]]</noinclude> 03aac86137ab11bfccbcceb2de919475af2953dd Template:Template list 10 852 1666 1665 2023-07-15T16:42:46Z Richard Robin 2 已从[[:dev:Template:Template_list]]导入1个版本 wikitext text/x-wiki == Resolution templates == {{hatnote|Category: [[:Category:Resolution templates|Resolution templates]]}} <section begin=resolution-templates/> * {{tl|done}} - {{done}} * {{tl|partly done}} - {{partly done}} * {{tl|resolved}} - {{resolved}} * {{tl|not done}} - {{not done}} * {{tl|doing}} - {{doing}} * {{tl|comment}} - {{comment}} * {{tl|on hold}} - {{on hold}} * {{tl|agree}} - {{agree}} * {{tl|withdrawn}} - {{withdrawn}} * {{tl|working}} - {{working}} * {{tl|idea}} - {{idea}} * {{tl|reviewing}} - {{reviewing}} * {{tl|note}} - {{note}} * {{tl|question}} - {{question}} * {{tl|high priority}} - {{high priority}} * {{tl|thank you}} - {{thank you}} * {{tl|pending}} - {{pending}} * {{tl|custom resolution}} - {{custom resolution|Earth Western Hemisphere transparent background.png|What on earth?}} <section end=resolution-templates/> == Voting templates == {{hatnote|Category: [[:Category:Voting templates|Voting templates]]}} <section begin=voting-templates/> * {{tl|support}} - {{support}} * {{tl|oppose}} - {{oppose}} * {{tl|abstain}} - {{abstain}} * {{tl|neutral}} - {{neutral}} <section end=voting-templates/> == Social media userboxes == {{hatnote|Category: [[:Category:Social media userboxes|Social media userboxes]]}} <section begin=social-media-userboxes/> {| class="wikitable" |- <noinclude>! Template !! Result |-</noinclude> | {{tl|User discord}} || {{User discord|nocat=yes}} |- | {{tl|User github}} || {{User github|nocat=yes}} |- | {{tl|User instagram}} || {{User instagram|nocat=yes}} |- | {{tl|User IRC}} || {{User IRC|nocat=yes}} |- | {{tl|User twitter}} || {{User twitter|nocat=yes}} |- | {{tl|User wikimedia}} || {{User wikimedia|nocat=yes}} |- | {{tl|User youtube}} || {{User youtube|nocat=yes}} |} <section end=social-media-userboxes/> [[Category:Templates| ]] 8e433f454d20d59b3b913e007e3d40f9e3c937eb Template:Header/doc 10 853 1668 1667 2023-07-15T16:42:46Z Richard Robin 2 已从[[:dev:Template:Header/doc]]导入1个版本 wikitext text/x-wiki {{documentation subpage}} ==Usage== <pre> {{header | title = | shortcut = | notes = | topbarhex = | bodyhex = | titlecolor = | bodycolor = }} </pre> ===Relative links=== On pages with many subpages, using [[m:Help:Link#Subpage_feature|relative links]] is highly recommended. This shortens the code and ensures that pages remain linked together, even if the overall system is moved or reorganised. The three formats are <nowiki>[[/subpage]]</nowiki> (subpage), <nowiki>[[../]]</nowiki> (parent), and <nowiki>[[../sibling]]</nowiki> (sibling); see the example usage below. Note that <nowiki>[[../]]</nowiki> will expand to the title of the parent page, which is ideal if the page is renamed at a later time. ==See also== {{#lst:Template:Template list|header-templates}} 5765ffdddc2682eb2227083ebcc24a126128ac5d Template:Navbox 10 79 1670 118 2023-07-15T16:48:22Z Richard Robin 2 已从[[:wikipedia:Template:Navbox]]导入1个版本 wikitext text/x-wiki <includeonly><!-- 请不要擅自在讨论前更改本模板的任何内容。本模板应用广泛,错误设置易导致全站崩溃。 -->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table class="navbox {{{class|}}}" cellspacing="0" style="{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">}}<!-- --><table cellspacing="0" class="nowraplinks {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|#default=mw-collapsible {{#if:{{{state|}}}|{{{state}}}|autocollapse}}}}}} {{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=navbox-subgroup" style="display:table;width:100%;{{{bodystyle|}}};{{{style|}}}|#default=" style="display:table;width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};"><!-- ---Title and Navbar--- -->{{#if:{{{title|}}}|<tr>{{#if:{{{titlegroup|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}"><!-- -->{{{titlegroup|}}}</td><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!-- -->colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} <!-- -->class="navbox-title"><!-- -->{{#if:{{#switch:{{{navbar|}}}|plain|off=1}}<!-- -->{{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}|<!-- -->{{#ifeq:{{{navbar|}}}|off|{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:2.78em;">&nbsp;</div>}}|<!-- -->{{#ifeq:{{{state|}}}|plain||<div style="float:left; width:2.78em;text-align:left;">&nbsp;</div>}}}}|<!-- --><div style="float:left; width:2.78em;text-align:left;"><span class="mobileonly">&nbsp;</span><!-- -->{{Navbar|{{{name}}}|fontstyle={{{basestyle|}}};{{{titlestyle|}}};border:none;|mini=1}}<!-- --></div>{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:2.78em;">&nbsp;</div>}}}}<!-- --><span style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"><!-- -->{{{title}}}</span></th></tr>}}<!-- ---Above--- -->{{#if:{{{above|}}}|<!-- -->{{#if:{{{title|}}}|<tr style="height:2px;"><td></td></tr>}}<!-- --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" <!-- -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{above}}}</td></tr>}}<!-- ---Body--- ---First group/list and images--- -->{{#if:{{{list1|}}}|{{#if:{{{title|}}}{{{above|}}}|<tr style="height:2px;"><td></td></tr>}}<tr><!-- -->{{#if:{{{imageleft|}}}|<!-- --><td style="width:0%;padding:0px 2px 0px 0px;{{{imageleftstyle|}}}" <!-- -->rowspan={{#expr:1{{#if:{{{list2|}}}|+2}}{{#if:{{{list3|}}}|+2}}{{#if:{{{list4|}}}|+2}}<!-- -->{{#if:{{{list5|}}}|+2}}{{#if:{{{list6|}}}|+2}}{{#if:{{{list7|}}}|+2}}{{#if:{{{list8|}}}|+2}}<!-- -->{{#if:{{{list9|}}}|+2}}{{#if:{{{list10|}}}|+2}}{{#if:{{{list11|}}}|+2}}{{#if:{{{list12|}}}|+2}}<!-- -->{{#if:{{{list13|}}}|+2}}{{#if:{{{list14|}}}|+2}}{{#if:{{{list15|}}}|+2}}{{#if:{{{list16|}}}|+2}}<!-- -->{{#if:{{{list17|}}}|+2}}{{#if:{{{list18|}}}|+2}}{{#if:{{{list19|}}}|+2}}{{#if:{{{list20|}}}|+2}}<!-- -->{{#if:{{{list21|}}}|+2}}{{#if:{{{list22|}}}|+2}}}}><!-- -->{{{imageleft|}}}</td>}}<!-- -->{{#if:{{{group1|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group1style|}}}"><!-- -->{{{group1}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list1style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{list1padding|{{{listpadding|0 0.25em}}}}}}">{{{list1}}}</div></td><!-- -->{{#if:{{{image|}}}|<!-- --><td style="width:0%;padding:0px 0px 0px 2px;{{{imagestyle|}}}" <!-- -->rowspan={{#expr:1{{#if:{{{list2|}}}|+2}}{{#if:{{{list3|}}}|+2}}{{#if:{{{list4|}}}|+2}}<!-- -->{{#if:{{{list5|}}}|+2}}{{#if:{{{list6|}}}|+2}}{{#if:{{{list7|}}}|+2}}{{#if:{{{list8|}}}|+2}}<!-- -->{{#if:{{{list9|}}}|+2}}{{#if:{{{list10|}}}|+2}}{{#if:{{{list11|}}}|+2}}{{#if:{{{list12|}}}|+2}}<!-- -->{{#if:{{{list13|}}}|+2}}{{#if:{{{list14|}}}|+2}}{{#if:{{{list15|}}}|+2}}{{#if:{{{list16|}}}|+2}}<!-- -->{{#if:{{{list17|}}}|+2}}{{#if:{{{list18|}}}|+2}}{{#if:{{{list19|}}}|+2}}{{#if:{{{list20|}}}|+2}}<!-- -->{{#if:{{{list21|}}}|+2}}{{#if:{{{list22|}}}|+2}}}}><!-- -->{{{image|}}}</td>}}<!-- --></tr>}}<!-- ---Remaining groups/lists--- -->{{#if:{{{list2|}}}|<!-- -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- -->{{#if:{{{group2|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group2style|}}}"><!-- -->{{{group2}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list2style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list2}}}</div></td></tr>}}<!-- -->{{#if:{{{list3|}}}|<!-- -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- -->{{#if:{{{group3|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group3style|}}}"><!-- -->{{{group3}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list3style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list3}}}</div></td></tr>}}<!-- -->{{#if:{{{list4|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group4|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group4style|}}}"><!-- -->{{{group4}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list4style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list4}}}</div></td></tr>}}<!-- -->{{#if:{{{list5|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group5|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group5style|}}}"><!-- -->{{{group5}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list5style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list5}}}</div></td></tr>}}<!-- -->{{#if:{{{list6|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group6|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group6style|}}}"><!-- -->{{{group6}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list6style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list6}}}</div></td></tr>}}<!-- -->{{#if:{{{list7|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group7|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group7style|}}}"><!-- -->{{{group7}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list7style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list7}}}</div></td></tr>}}<!-- -->{{#if:{{{list8|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group8|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group8style|}}}"><!-- -->{{{group8}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list8style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list8}}}</div></td></tr>}}<!-- -->{{#if:{{{list9|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group9|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group9style|}}}"><!-- -->{{{group9}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list9style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list9}}}</div></td></tr>}}<!-- -->{{#if:{{{list10|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group10|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group10style|}}}"><!-- -->{{{group10}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list10style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list10}}}</div></td></tr>}}<!-- -->{{#if:{{{list11|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group11|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group11style|}}}"><!-- -->{{{group11}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list11style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list11}}}</div></td></tr>}}<!-- -->{{#if:{{{list12|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group12|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group12style|}}}"><!-- -->{{{group12}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list12style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list12}}}</div></td></tr>}}<!-- -->{{#if:{{{list13|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group13|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group13style|}}}"><!-- -->{{{group13}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list13style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list13}}}</div></td></tr>}}<!-- -->{{#if:{{{list14|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group14|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group14style|}}}"><!-- -->{{{group14}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list14style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list14}}}</div></td></tr>}}<!-- -->{{#if:{{{list15|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group15|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group15style|}}}"><!-- -->{{{group15}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list15style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list15}}}</div></td></tr>}}<!-- -->{{#if:{{{list16|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group16|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group16style|}}}"><!-- -->{{{group16}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list16style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list16}}}</div></td></tr>}}<!-- -->{{#if:{{{list17|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group17|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group17style|}}}"><!-- -->{{{group17}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list17style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list17}}}</div></td></tr>}}<!-- -->{{#if:{{{list18|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group18|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group18style|}}}"><!-- -->{{{group18}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list18style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list18}}}</div></td></tr>}}<!-- -->{{#if:{{{list19|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group19|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group19style|}}}"><!-- -->{{{group19}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list19style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list19}}}</div></td></tr>}}<!-- -->{{#if:{{{list20|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group20|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group20style|}}}"><!-- -->{{{group20}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list20style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list20}}}</div></td></tr>}}<!-- -->{{#if:{{{list21|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group21|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group21style|}}}"><!-- -->{{{group21}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list21style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list21}}}</div></td></tr>}}<!-- -->{{#if:{{{list22|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group22|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group22style|}}}"><!-- -->{{{group22}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list22style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list22}}}</div></td></tr>}}<!-- -->{{#if:{{{list23|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group23|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group23style|}}}"><!-- -->{{{group23}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list23style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list23}}}</div></td></tr>}}<!-- -->{{#if:{{{list24|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group24|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group24style|}}}"><!-- -->{{{group24}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list24style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list24}}}</div></td></tr>}}<!-- -->{{#if:{{{list25|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group25|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group25style|}}}"><!-- -->{{{group25}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list25style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list25}}}</div></td></tr>}}<!-- -->{{#if:{{{list26|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group26|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group26style|}}}"><!-- -->{{{group26}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list26style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list26}}}</div></td></tr>}}<!-- -->{{#if:{{{list27|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group27|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group27style|}}}"><!-- -->{{{group27}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list27style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list27}}}</div></td></tr>}}<!-- -->{{#if:{{{list28|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group28|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group28style|}}}"><!-- -->{{{group28}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list28style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list28}}}</div></td></tr>}}<!-- -->{{#if:{{{list29|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group29|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group29style|}}}"><!-- -->{{{group29}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list29style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list29}}}</div></td></tr>}}<!-- -->{{#if:{{{list30|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group30|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group30style|}}}"><!-- -->{{{group30}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list30style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list30}}}</div></td></tr>}}<!-- -->{{#if:{{{list31|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group31|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group31style|}}}"><!-- -->{{{group31}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list31style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list31}}}</div></td></tr>}}<!-- -->{{#if:{{{list32|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group32|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group32style|}}}"><!-- -->{{{group32}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list32style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list32}}}</div></td></tr>}}<!-- -->{{#if:{{{list33|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group33|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group33style|}}}"><!-- -->{{{group33}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list33style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list33}}}</div></td></tr>}}<!-- -->{{#if:{{{list34|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group34|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group34style|}}}"><!-- -->{{{group34}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list34style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list34}}}</div></td></tr>}}<!-- -->{{#if:{{{list35|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group35|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group35style|}}}"><!-- -->{{{group35}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list35style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list35}}}</div></td></tr>}}<!-- -->{{#if:{{{list36|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group36|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group36style|}}}"><!-- -->{{{group36}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list36style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list36}}}</div></td></tr>}}<!-- -->{{#if:{{{list37|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group37|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group37style|}}}"><!-- -->{{{group37}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list37style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list37}}}</div></td></tr>}}<!-- -->{{#if:{{{list38|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group38|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group38style|}}}"><!-- -->{{{group38}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list38style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list38}}}</div></td></tr>}}<!-- -->{{#if:{{{list39|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group39|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group39style|}}}"><!-- -->{{{group39}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list39style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list39}}}</div></td></tr>}}<!-- -->{{#if:{{{list40|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group40|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group40style|}}}"><!-- -->{{{group40}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list40style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list40}}}</div></td></tr>}}<!-- -->{{#if:{{{list41|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group41|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group41style|}}}"><!-- -->{{{group41}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list41style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list41}}}</div></td></tr>}}<!-- -->{{#if:{{{list42|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group42|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group42style|}}}"><!-- -->{{{group42}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list42style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list42}}}</div></td></tr>}}<!-- -->{{#if:{{{list43|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group43|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group43style|}}}"><!-- -->{{{group43}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list43style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list43}}}</div></td></tr>}}<!-- -->{{#if:{{{list44|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group44|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group44style|}}}"><!-- -->{{{group44}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list44style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list44}}}</div></td></tr>}}<!-- -->{{#if:{{{list45|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group45|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group45style|}}}"><!-- -->{{{group45}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list45style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list45}}}</div></td></tr>}}<!-- -->{{#if:{{{list46|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group46|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group46style|}}}"><!-- -->{{{group46}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list46style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list46}}}</div></td></tr>}}<!-- -->{{#if:{{{list47|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group47|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group47style|}}}"><!-- -->{{{group47}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list47style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list47}}}</div></td></tr>}}<!-- -->{{#if:{{{list48|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group48|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group48style|}}}"><!-- -->{{{group48}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list48style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list48}}}</div></td></tr>}}<!-- -->{{#if:{{{list49|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group49|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group49style|}}}"><!-- -->{{{group49}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list49style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list49}}}</div></td></tr>}}<!-- -->{{#if:{{{list50|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group50|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group50style|}}}"><!-- -->{{{group50}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list50style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list50}}}</div></td></tr>}}<!-- ---Below--- -->{{#if:{{{below|}}}|<!-- -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<tr style="height:2px;"><td></td></tr>}}<!-- --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" <!-- -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{below}}}</td></tr>}}<!-- --></table>{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=<div>|none=|#default=</td></tr></table>}}<!-- --></includeonly><noinclude> {{documentation}} <!-- 请将分类与跨语言链结增加在/doc子页面 / 請將分類與跨語言連結增加在/doc子頁面 --> </noinclude> 961a66db4bef06739d50fecd2c6c51c7544965e9 Module:Yesno 828 848 1672 1658 2023-07-15T16:48:23Z Richard Robin 2 已从[[:wikipedia:Module:Yesno]]导入1个版本 Scribunto text/plain -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or tonumber(val) == 0 then return false else return default end end f767643e7d12126d020d88d662a3dd057817b9dc Module:Arguments 828 837 1674 1634 2023-07-15T16:48:24Z Richard Robin 2 已从[[:wikipedia:Module:Arguments]]导入1个版本 Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Template:Tl 10 32 1676 1646 2023-07-15T16:48:24Z Richard Robin 2 已从[[:wikipedia:Template:Tl]]导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:Template link]] fb9a6b420e13178e581af6e7d64274cd30a79017 Template:Template link 10 841 1678 1642 2023-07-15T16:48:24Z Richard Robin 2 已从[[:wikipedia:Template:Template_link]]导入1个版本 wikitext text/x-wiki &#123;&#123;[[Template:{{{1}}}|{{{1}}}]]&#125;&#125;<noinclude>{{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> eabbec62efe3044a98ebb3ce9e7d4d43c222351d Module:Message box 828 845 1680 1652 2023-07-15T16:48:25Z Richard Robin 2 已从[[:wikipedia:Module:Message_box]]导入1个版本 Scribunto text/plain -- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary modules. require('Module:No globals') local getArgs local yesno = require('Module:Yesno') local templatestyles = 'Module:Message box/styles.css' -- Get a language object for formatDate and ucfirst. local lang = mw.language.getContentLanguage() -- Define constants local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {user = 'tmbox', talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else local sect if args.sect == '' then sect = 'This ' .. (cfg.sectionDefault or 'page') elseif type(args.sect) == 'string' then sect = 'This ' .. args.sect end local issue = args.issue issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date) end self.info = args.info end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- Set the below row. self.below = cfg.below and args.below -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell if cfg.imageEmptyCellStyle then self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px' end -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, date) self:addCat(0, catTitle) catTitle = getTitleObject('Category:' .. catTitle) if not catTitle or not catTitle.exists then self:addCat(0, 'Articles with invalid date parameter in template') end elseif mainCat and (not date or date == '') then self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:export() local root = mw.html.create() -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):css('width', '52px') end imageLeftCell:wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') :cssText(self.imageEmptyCellStyle or nil) end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) and not self.isSmall then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):css('width', '52px') end imageRightCell :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :css('text-align', 'center') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() return box:export() end local function templatestyles(frame, src) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = templatestyles} } .. 'CONFIG_MODULE' end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) be00cd389f9f2afcd361e5d5e33622839555cbd9 Module:Message box/configuration 828 846 1682 1654 2023-07-15T16:48:25Z Richard Robin 2 已从[[:wikipedia:Module:Message_box/configuration]]导入1个版本 Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix'}, }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox license.png' -- @todo We need an SVG version of this }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg' }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes' }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, imageEmptyCellStyle = true, templateCategory = 'Talk message boxes' } } c6bd9191861b23e474e12b19c694335c4bc3af5f Module:Redirect 828 854 1684 1683 2023-07-15T16:48:25Z Richard Robin 2 已从[[:wikipedia:Module:Redirect]]导入1个版本 Scribunto text/plain -- This module provides functions for getting the target of a redirect page. local p = {} -- Gets a mw.title object, using pcall to avoid generating script errors if we -- are over the expensive function count limit (among other possible causes). local function getTitle(...) local success, titleObj = pcall(mw.title.new, ...) if success then return titleObj else return nil end end -- Gets the name of a page that a redirect leads to, or nil if it isn't a -- redirect. function p.getTargetFromText(text) local target = string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]" ) or string.match( text, "^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]" ) return target and mw.uri.decode(target, 'PATH') end -- Gets the target of a redirect. If the page specified is not a redirect, -- returns nil. function p.getTarget(page, fulltext) -- Get the title object. Both page names and title objects are allowed -- as input. local titleObj if type(page) == 'string' or type(page) == 'number' then titleObj = getTitle(page) elseif type(page) == 'table' and type(page.getContent) == 'function' then titleObj = page else error(string.format( "bad argument #1 to 'getTarget'" .. " (string, number, or title object expected, got %s)", type(page) ), 2) end if not titleObj then return nil end local targetTitle = titleObj.redirectTarget if targetTitle then if fulltext then return targetTitle.fullText else return targetTitle.prefixedText end else return nil end end --[[ -- Given a single page name determines what page it redirects to and returns the -- target page name, or the passed page name when not a redirect. The passed -- page name can be given as plain text or as a page link. -- -- Returns page name as plain text, or when the bracket parameter is given, as a -- page link. Returns an error message when page does not exist or the redirect -- target cannot be determined for some reason. --]] function p.luaMain(rname, bracket, fulltext) if type(rname) ~= "string" or not rname:find("%S") then return nil end bracket = bracket and "[[%s]]" or "%s" rname = rname:match("%[%[(.+)%]%]") or rname local target = p.getTarget(rname, fulltext) local ret = target or rname ret = getTitle(ret) if ret then if fulltext then ret = ret.fullText else ret = ret.prefixedText end return bracket:format(ret) else return nil end end -- Provides access to the luaMain function from wikitext. function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) return p.luaMain(args[1], args.bracket, args.fulltext) or '' end -- Returns true if the specified page is a redirect, and false otherwise. function p.luaIsRedirect(page) local titleObj = getTitle(page) if not titleObj then return false end if titleObj.isRedirect then return true else return false end end -- Provides access to the luaIsRedirect function from wikitext, returning 'yes' -- if the specified page is a redirect, and the blank string otherwise. function p.isRedirect(frame) local args = require('Module:Arguments').getArgs(frame, {frameOnly = true}) if p.luaIsRedirect(args[1]) then return 'yes' else return '' end end return p a224c45940343d66f49a78b0a39b2045e2c45d20 Template:DMCA 10 855 1686 1685 2023-07-15T16:48:26Z Richard Robin 2 已从[[:wikipedia:Template:DMCA]]导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:Dated maintenance category (articles)]] {{Redirect category shell| {{R from move}} {{R from modification}} {{R from template shortcut}} }} 711d3f1c53fa704297f675a8dcf1a56719c5b654 Template:Dated maintenance category 10 856 1688 1687 2023-07-15T16:48:27Z Richard Robin 2 已从[[:wikipedia:Template:Dated_maintenance_category]]导入1个版本 wikitext text/x-wiki <nowiki/><!--This nowiki helps to prevent whitespace at the top of articles-->{{#ifeq:{{FULLROOTPAGENAME}}|Wikipedia:Template messages|<!--Do not categorize-->|<!-- -->{{#ifexpr:{{#if:{{NAMESPACE}}|0|1}}+{{#ifeq:{{{onlyarticles|no}}}|yes|0|1}} |{{#if:{{{3|}}} |[[Category:{{{1}}} {{{2}}} {{{3}}}]]<!-- -->{{#ifexist:Category:{{{1}}} {{{2}}} {{{3}}} |<!-- -->|[[Category:Articles with invalid date parameter in template]]<!-- -->}} |[[Category:{{#if:{{{5|}}} |{{{5}}}<!-- -->|{{{1}}}<!-- -->}}]]<!-- -->}}{{#if:{{{4|}}} |[[Category:{{{4}}}]]}}<!-- -->}}<!-- -->}}<noinclude> {{documentation}} </noinclude> 41e7d4000124d4f718ddf222af0b72825048c4c4 Template:FULLROOTPAGENAME 10 857 1690 1689 2023-07-15T16:48:27Z Richard Robin 2 已从[[:wikipedia:Template:FULLROOTPAGENAME]]导入1个版本 wikitext text/x-wiki {{ safesubst:<noinclude/>#if: {{ safesubst:<noinclude/>Ns has subpages | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{ safesubst:<noinclude/>NAMESPACE:{{{1}}}}}|{{ safesubst:<noinclude/>NAMESPACE}}}} }} | {{ safesubst:<noinclude/>#titleparts:{{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}}|1}} | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}} }}<noinclude> {{documentation}} </noinclude> fd0c4e7050dded2d50e5df405e6e5e31dd0d46ac Template:Ns has subpages 10 858 1692 1691 2023-07-15T16:48:28Z Richard Robin 2 已从[[:wikipedia:Template:Ns_has_subpages]]导入1个版本 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Ns has subpages|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 060d2d01af26cb67fd90a7c346a0d2d5e450a040 Module:Ns has subpages 828 859 1694 1693 2023-07-15T16:48:28Z Richard Robin 2 已从[[:wikipedia:Module:Ns_has_subpages]]导入1个版本 Scribunto text/plain -- This module implements [[Template:Ns has subpages]]. -- While the template is fairly simple, this information is made available to -- Lua directly, so using a module means that we don't have to update the -- template as new namespaces are added. local p = {} function p._main(ns, frame) -- Get the current namespace if we were not passed one. if not ns then ns = mw.title.getCurrentTitle().namespace end -- Look up the namespace table from mw.site.namespaces. This should work -- for a majority of cases. local nsTable = mw.site.namespaces[ns] -- Try using string matching to get the namespace from page names. -- Do a quick and dirty bad title check to try and make sure we do the same -- thing as {{NAMESPACE}} in most cases. if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then local nsStripped = ns:gsub('^[_%s]*:', '') nsStripped = nsStripped:gsub(':.*$', '') nsTable = mw.site.namespaces[nsStripped] end -- If we still have no match then try the {{NAMESPACE}} parser function, -- which should catch the remainder of cases. Don't use a mw.title object, -- as this would increment the expensive function count for each new page -- tested. if not nsTable then frame = frame or mw.getCurrentFrame() local nsProcessed = frame:callParserFunction('NAMESPACE', ns) nsTable = nsProcessed and mw.site.namespaces[nsProcessed] end return nsTable and nsTable.hasSubpages end function p.main(frame) local ns = frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns, frame) return hasSubpages and 'yes' or '' end return p e133068ba73738b16e1e3eba47735516a461eb5b Template:Yesno 10 860 1696 1695 2023-07-15T16:48:29Z Richard Robin 2 已从[[:wikipedia:Template:Yesno]]导入1个版本 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |f |false |off |0 = {{{no|<!-- null -->}}} | = {{{blank|{{{no|<!-- null -->}}}}}} |¬ = {{{¬|}}} |yes |y |t |true |on |1 = {{{yes|yes}}} |#default = {{{def|{{{yes|yes}}}}}} }}<noinclude> {{Documentation}} </noinclude> 629c2937bc5cf7cfe13cd2a598582af832782399 Template:Main other 10 861 1698 1697 2023-07-15T16:48:29Z Richard Robin 2 已从[[:wikipedia:Template:Main_other]]导入1个版本 wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:0}} | main | other }} }} | main = {{{1|}}} | other | #default = {{{2|}}} }}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> 86ad907ffeea3cc545159e00cd1f2d6433946450 Module:Check for unknown parameters 828 862 1700 1699 2023-07-15T16:48:30Z Richard Robin 2 已从[[:wikipedia:Module:Check_for_unknown_parameters]]导入1个版本 Scribunto text/plain -- This module may be used to compare the arguments passed to the parent -- with a list of arguments, returning a specified result if an argument is -- not on the list local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end local function clean(text) -- Return text cleaned for display and truncated if too long. -- Strip markers are replaced with dummy text representing the original wikitext. local pos, truncated local function truncate(text) if truncated then return '' end if mw.ustring.len(text) > 25 then truncated = true text = mw.ustring.sub(text, 1, 25) .. '...' end return mw.text.nowiki(text) end local parts = {} for before, tag, remainder in text:gmatch('([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()') do pos = remainder table.insert(parts, truncate(before) .. '&lt;' .. tag .. '&gt;...&lt;/' .. tag .. '&gt;') end table.insert(parts, truncate(text:sub(pos or 1))) return table.concat(parts) end function p._check(args, pargs) if type(args) ~= "table" or type(pargs) ~= "table" then -- TODO: error handling return end -- create the list of known args, regular expressions, and the return string local knownargs = {} local regexps = {} for k, v in pairs(args) do if type(k) == 'number' then v = trim(v) knownargs[v] = 1 elseif k:find('^regexp[1-9][0-9]*$') then table.insert(regexps, '^' .. v .. '$') end end -- loop over the parent args, and make sure they are on the list local ignoreblank = isnotempty(args['ignoreblank']) local showblankpos = isnotempty(args['showblankpositional']) local values = {} for k, v in pairs(pargs) do if type(k) == 'string' and knownargs[k] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(k, regexp) then knownflag = true break end end if not knownflag and ( not ignoreblank or isnotempty(v) ) then table.insert(values, clean(k)) end elseif type(k) == 'number' and knownargs[tostring(k)] == nil then local knownflag = false for _, regexp in ipairs(regexps) do if mw.ustring.match(tostring(k), regexp) then knownflag = true break end end if not knownflag and ( showblankpos or isnotempty(v) ) then table.insert(values, k .. ' = ' .. clean(v)) end end end -- add results to the output tables local res = {} if #values > 0 then local unknown_text = args['unknown'] or 'Found _VALUE_, ' if mw.getCurrentFrame():preprocess( "{{REVISIONID}}" ) == "" then local preview_text = args['preview'] if isnotempty(preview_text) then preview_text = require('Module:If preview')._warning({preview_text}) elseif preview == nil then preview_text = unknown_text end unknown_text = preview_text end for _, v in pairs(values) do -- Fix odd bug for | = which gets stripped to the empty string and -- breaks category links if v == '' then v = ' ' end -- avoid error with v = 'example%2' ("invalid capture index") local r = unknown_text:gsub('_VALUE_', {_VALUE_ = v}) table.insert(res, r) end end return table.concat(res) end function p.check(frame) local args = frame.args local pargs = frame:getParent().args return p._check(args, pargs) end return p 93db6d115d4328d2a5148bb42959105e367b663e Module:String 828 863 1702 1701 2023-07-15T16:48:30Z Richard Robin 2 已从[[:wikipedia:Module:String]]导入1个版本 Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The fist index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 6df794dd52434e0f6a372c9918f5a9dedd15f579 Module:List 828 864 1704 1703 2023-07-15T16:48:31Z Richard Robin 2 已从[[:wikipedia:Module:List]]导入1个版本 Scribunto text/plain local libUtil = require('libraryUtil') local checkType = libUtil.checkType local mTableTools = require('Module:TableTools') local p = {} local listTypes = { ['bulleted'] = true, ['unbulleted'] = true, ['horizontal'] = true, ['ordered'] = true, ['horizontal_ordered'] = true } function p.makeListData(listType, args) -- Constructs a data table to be passed to p.renderList. local data = {} -- Classes and TemplateStyles data.classes = {} data.templatestyles = '' if listType == 'horizontal' or listType == 'horizontal_ordered' then table.insert(data.classes, 'hlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Hlist/styles.css' } } elseif listType == 'unbulleted' then table.insert(data.classes, 'plainlist') data.templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plainlist/styles.css' } } end table.insert(data.classes, args.class) -- Main div style data.style = args.style -- Indent for horizontal lists if listType == 'horizontal' or listType == 'horizontal_ordered' then local indent = tonumber(args.indent) indent = indent and indent * 1.6 or 0 if indent > 0 then data.marginLeft = indent .. 'em' end end -- List style types for ordered lists -- This could be "1, 2, 3", "a, b, c", or a number of others. The list style -- type is either set by the "type" attribute or the "list-style-type" CSS -- property. if listType == 'ordered' or listType == 'horizontal_ordered' then data.listStyleType = args.list_style_type or args['list-style-type'] data.type = args['type'] -- Detect invalid type attributes and attempt to convert them to -- list-style-type CSS properties. if data.type and not data.listStyleType and not tostring(data.type):find('^%s*[1AaIi]%s*$') then data.listStyleType = data.type data.type = nil end end -- List tag type if listType == 'ordered' or listType == 'horizontal_ordered' then data.listTag = 'ol' else data.listTag = 'ul' end -- Start number for ordered lists data.start = args.start if listType == 'horizontal_ordered' then -- Apply fix to get start numbers working with horizontal ordered lists. local startNum = tonumber(data.start) if startNum then data.counterReset = 'listitem ' .. tostring(startNum - 1) end end -- List style -- ul_style and ol_style are included for backwards compatibility. No -- distinction is made for ordered or unordered lists. data.listStyle = args.list_style -- List items -- li_style is included for backwards compatibility. item_style was included -- to be easier to understand for non-coders. data.itemStyle = args.item_style or args.li_style data.items = {} for _, num in ipairs(mTableTools.numKeys(args)) do local item = {} item.content = args[num] item.style = args['item' .. tostring(num) .. '_style'] or args['item_style' .. tostring(num)] item.value = args['item' .. tostring(num) .. '_value'] or args['item_value' .. tostring(num)] table.insert(data.items, item) end return data end function p.renderList(data) -- Renders the list HTML. -- Return the blank string if there are no list items. if type(data.items) ~= 'table' or #data.items < 1 then return '' end -- Render the main div tag. local root = mw.html.create('div') for _, class in ipairs(data.classes or {}) do root:addClass(class) end root:css{['margin-left'] = data.marginLeft} if data.style then root:cssText(data.style) end -- Render the list tag. local list = root:tag(data.listTag or 'ul') list :attr{start = data.start, type = data.type} :css{ ['counter-reset'] = data.counterReset, ['list-style-type'] = data.listStyleType } if data.listStyle then list:cssText(data.listStyle) end -- Render the list items for _, t in ipairs(data.items or {}) do local item = list:tag('li') if data.itemStyle then item:cssText(data.itemStyle) end if t.style then item:cssText(t.style) end item :attr{value = t.value} :wikitext(t.content) end return data.templatestyles .. tostring(root) end function p.renderTrackingCategories(args) local isDeprecated = false -- Tracks deprecated parameters. for k, v in pairs(args) do k = tostring(k) if k:find('^item_style%d+$') or k:find('^item_value%d+$') then isDeprecated = true break end end local ret = '' if isDeprecated then ret = ret .. '[[Category:List templates with deprecated parameters]]' end return ret end function p.makeList(listType, args) if not listType or not listTypes[listType] then error(string.format( "bad argument #1 to 'makeList' ('%s' is not a valid list type)", tostring(listType) ), 2) end checkType('makeList', 2, args, 'table') local data = p.makeListData(listType, args) local list = p.renderList(data) local trackingCategories = p.renderTrackingCategories(args) return list .. trackingCategories end for listType in pairs(listTypes) do p[listType] = function (frame) local mArguments = require('Module:Arguments') local origArgs = mArguments.getArgs(frame, { valueFunc = function (key, value) if not value or not mw.ustring.find(value, '%S') then return nil end if mw.ustring.find(value, '^%s*[%*#;:]') then return value else return value:match('^%s*(.-)%s*$') end return nil end }) -- Copy all the arguments to a new table, for faster indexing. local args = {} for k, v in pairs(origArgs) do args[k] = v end return p.makeList(listType, args) end end return p 7a4f36a6e9cd56370bdd8207d23694124821dc1a Module:TableTools 828 865 1706 1705 2023-07-15T16:48:31Z Richard Robin 2 已从[[:wikipedia:Module:TableTools]]导入1个版本 Scribunto text/plain ------------------------------------------------------------------------------------ -- TableTools -- -- -- -- This module includes a number of functions for dealing with Lua tables. -- -- It is a meta-module, meant to be called from other Lua modules, and should not -- -- be called directly from #invoke. -- ------------------------------------------------------------------------------------ local libraryUtil = require('libraryUtil') local p = {} -- Define often-used variables and functions. local floor = math.floor local infinity = math.huge local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- isPositiveInteger -- -- This function returns true if the given value is a positive integer, and false -- if not. Although it doesn't operate on tables, it is included here as it is -- useful for determining whether a given table key is in the array part or the -- hash part of a table. ------------------------------------------------------------------------------------ function p.isPositiveInteger(v) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity end ------------------------------------------------------------------------------------ -- isNan -- -- This function returns true if the given number is a NaN value, and false if -- not. Although it doesn't operate on tables, it is included here as it is useful -- for determining whether a value can be a valid table key. Lua will generate an -- error if a NaN is used as a table key. ------------------------------------------------------------------------------------ function p.isNan(v) return type(v) == 'number' and v ~= v end ------------------------------------------------------------------------------------ -- shallowClone -- -- This returns a clone of a table. The value returned is a new table, but all -- subtables and functions are shared. Metamethods are respected, but the returned -- table will have no metatable of its own. ------------------------------------------------------------------------------------ function p.shallowClone(t) checkType('shallowClone', 1, t, 'table') local ret = {} for k, v in pairs(t) do ret[k] = v end return ret end ------------------------------------------------------------------------------------ -- removeDuplicates -- -- This removes duplicate values from an array. Non-positive-integer keys are -- ignored. The earliest value is kept, and all subsequent duplicate values are -- removed, but otherwise the array order is unchanged. ------------------------------------------------------------------------------------ function p.removeDuplicates(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) do if isNan(v) then -- NaNs can't be table keys, and they are also unique, so we don't need to check existence. ret[#ret + 1] = v else if not exists[v] then ret[#ret + 1] = v exists[v] = true end end end return ret end ------------------------------------------------------------------------------------ -- numKeys -- -- This takes a table and returns an array containing the numbers of any numerical -- keys that have non-nil values, sorted in numerical order. ------------------------------------------------------------------------------------ function p.numKeys(t) checkType('numKeys', 1, t, 'table') local isPositiveInteger = p.isPositiveInteger local nums = {} for k in pairs(t) do if isPositiveInteger(k) then nums[#nums + 1] = k end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- affixNums -- -- This takes a table and returns an array containing the numbers of keys with the -- specified prefix and suffix. For example, for the table -- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will return -- {1, 3, 6}. ------------------------------------------------------------------------------------ function p.affixNums(t, prefix, suffix) checkType('affixNums', 1, t, 'table') checkType('affixNums', 2, prefix, 'string', true) checkType('affixNums', 3, suffix, 'string', true) local function cleanPattern(s) -- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k in pairs(t) do if type(k) == 'string' then local num = mw.ustring.match(k, pattern) if num then nums[#nums + 1] = tonumber(num) end end end table.sort(nums) return nums end ------------------------------------------------------------------------------------ -- numData -- -- Given a table with keys like {"foo1", "bar1", "foo2", "baz2"}, returns a table -- of subtables in the format -- {[1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'}}. -- Keys that don't end with an integer are stored in a subtable named "other". The -- compress option compresses the table so that it can be iterated over with -- ipairs. ------------------------------------------------------------------------------------ function p.numData(t, compress) checkType('numData', 1, t, 'table') checkType('numData', 2, compress, 'boolean', true) local ret = {} for k, v in pairs(t) do local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$') if num then num = tonumber(num) local subtable = ret[num] or {} if prefix == '' then -- Positional parameters match the blank string; put them at the start of the subtable instead. prefix = 1 end subtable[prefix] = v ret[num] = subtable else local subtable = ret.other or {} subtable[k] = v ret.other = subtable end end if compress then local other = ret.other ret = p.compressSparseArray(ret) ret.other = other end return ret end ------------------------------------------------------------------------------------ -- compressSparseArray -- -- This takes an array with one or more nil values, and removes the nil values -- while preserving the order, so that the array can be safely traversed with -- ipairs. ------------------------------------------------------------------------------------ function p.compressSparseArray(t) checkType('compressSparseArray', 1, t, 'table') local ret = {} local nums = p.numKeys(t) for _, num in ipairs(nums) do ret[#ret + 1] = t[num] end return ret end ------------------------------------------------------------------------------------ -- sparseIpairs -- -- This is an iterator for sparse arrays. It can be used like ipairs, but can -- handle nil values. ------------------------------------------------------------------------------------ function p.sparseIpairs(t) checkType('sparseIpairs', 1, t, 'table') local nums = p.numKeys(t) local i = 0 local lim = #nums return function () i = i + 1 if i <= lim then local key = nums[i] return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- size -- -- This returns the size of a key/value pair table. It will also work on arrays, -- but for arrays it is more efficient to use the # operator. ------------------------------------------------------------------------------------ function p.size(t) checkType('size', 1, t, 'table') local i = 0 for _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) -- Stores copies of tables indexed by the original table. already_seen = already_seen or {} local copy = already_seen[orig] if copy ~= nil then return copy end if type(orig) == 'table' then copy = {} for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end already_seen[orig] = copy if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then local mt_copy = _deepCopy(mt, includeMetatable, already_seen) setmetatable(copy, mt_copy) already_seen[mt] = mt_copy end end else -- number, string, boolean, etc copy = orig end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if valueToFind is a member of the array, and false otherwise. ------------------------------------------------------------------------------------ function p.inArray(arr, valueToFind) checkType("inArray", 1, arr, "table") -- if valueToFind is nil, error? for _, v in ipairs(arr) do if v == valueToFind then return true end end return false end return p 085e7094ac84eb0132ee65822cf3f69cd8ba3d81 Template:Spaces 10 866 1708 1707 2023-07-15T16:48:31Z Richard Robin 2 已从[[:wikipedia:Template:Spaces]]导入1个版本 wikitext text/x-wiki <span class="nowrap">{{#iferror:{{#expr:{{{1|1}}}}} |{{#switch:{{{1}}} |fig=&#8199; |en=&ensp; |em=&emsp; |thin=&thinsp; |hair=&#8202; |&nbsp; }} |{{#invoke:String|rep|{{#switch:{{{2}}} |fig=&#8199; |en=&ensp; |em=&emsp; |thin=&thinsp; |hair=&#8202; |&nbsp; }}|{{{1|1}}}}} }}</span><noinclude> {{documentation}} </noinclude> a9ed762825e7579f15dcb9b171b0c1c3bf524b3f Module:Template link general 828 867 1710 1709 2023-07-15T16:48:32Z Richard Robin 2 已从[[:wikipedia:Module:Template_link_general]]导入1个版本 Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Template:Template other 10 868 1712 1711 2023-07-15T16:48:32Z Richard Robin 2 已从[[:wikipedia:Template:Template_other]]导入1个版本 wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 06fb13d264df967b5232141067eb7d2b67372d76 Template:Clear 10 844 1714 1650 2023-07-15T16:48:32Z Richard Robin 2 已从[[:wikipedia:Template:Clear]]导入1个版本 wikitext text/x-wiki <div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude> 38bab3e3d7fbd3d6800d46556e60bc6bac494d72 Template:Main 10 869 1716 1715 2023-07-15T16:48:33Z Richard Robin 2 已从[[:wikipedia:Template:Main]]导入1个版本 wikitext text/x-wiki <includeonly>{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 99ebf54e265aa9354bc4861d3b0da913f1441ede Template:Sidebar 10 870 1718 1717 2023-07-15T16:48:33Z Richard Robin 2 已从[[:wikipedia:Template:Sidebar]]导入1个版本 wikitext text/x-wiki {{#invoke:Sidebar|sidebar}}<noinclude> {{documentation}}</noinclude> ab2498000a99daf324f656b0badd187b4a3e2b42 Template:Plainlist 10 871 1720 1719 2023-07-15T16:48:34Z Richard Robin 2 已从[[:wikipedia:Template:Plainlist]]导入1个版本 wikitext text/x-wiki <templatestyles src="Plainlist/styles.css"/><div class="plainlist {{{class|}}}" {{#if:{{{style|}}}{{{indent|}}}|style="{{#if:{{{indent|}}}|margin-left: {{#expr:{{{indent}}}*1.6}}em;}} {{{style|}}}"}}>{{#if:{{{1|}}}| {{{1}}} </div>}}<noinclude></div> {{documentation}} </noinclude> 582fe7098c25c1ecfc0ad32f62ecd674ebe2bdf0 Module:Effective protection expiry 828 872 1722 1721 2023-07-15T16:48:34Z Richard Robin 2 已从[[:wikipedia:Module:Effective_protection_expiry]]导入1个版本 Scribunto text/plain local p = {} -- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title) return stabilitySettings and stabilitySettings.expiry or 'unknown' elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 ) end local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename) if rawExpiry == 'infinity' then return 'infinity' elseif rawExpiry == '' then return 'unknown' else local year, month, day, hour, minute, second = rawExpiry:match( '^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$' ) if year then return string.format( '%s-%s-%sT%s:%s:%s', year, month, day, hour, minute, second ) else error('internal error in Module:Effective protection expiry; malformed expiry timestamp') end end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 9a8c58dc2667232ed08a9b206a5d89ca8150312b Module:Effective protection level 828 873 1724 1723 2023-07-15T16:48:34Z Richard Robin 2 已从[[:wikipedia:Module:Effective_protection_level]]导入1个版本 Scribunto text/plain local p = {} -- Returns the permission required to perform a given action on a given title. -- If no title is specified, the title of the page being displayed is used. function p._main(action, pagename) local title if type(pagename) == 'table' and pagename.prefixedText then title = pagename elseif pagename then title = mw.title.new(pagename) else title = mw.title.getCurrentTitle() end pagename = title.prefixedText if action == 'autoreview' then local level = mw.ext.FlaggedRevs.getStabilitySettings(title) level = level and level.autoreview if level == 'review' then return 'reviewer' elseif level ~= '' then return level else return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review end elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then return 'sysop' end local level = title.protectionLevels[action] and title.protectionLevels[action][1] if level == 'sysop' or level == 'editprotected' then return 'sysop' elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page return 'sysop' elseif level == 'templateeditor' then return 'templateeditor' elseif action == 'move' then local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move. if blacklistentry and not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif title.namespace == 6 then return 'filemover' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end end local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) if blacklistentry then if not blacklistentry.params.autoconfirmed then return 'templateeditor' elseif level == 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason return 'autoconfirmed' elseif level then return level elseif action == 'upload' then return 'autoconfirmed' elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts return 'user' else return '*' end end setmetatable(p, { __index = function(t, k) return function(frame) return t._main(k, frame.args[1]) end end }) return p 70256a489edf6be9808031b14a7e3ef3e025da97 Module:File link 828 874 1726 1725 2023-07-15T16:48:35Z Richard Robin 2 已从[[:wikipedia:Module:File_link]]导入1个版本 Scribunto text/plain -- This module provides a library for formatting file wikilinks. local yesno = require('Module:Yesno') local checkType = require('libraryUtil').checkType local p = {} function p._main(args) checkType('_main', 1, args, 'table') -- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our -- own function to get the right error level. local function checkArg(key, val, level) if type(val) ~= 'string' then error(string.format( "type error in '%s' parameter of '_main' (expected string, got %s)", key, type(val) ), level) end end local ret = {} -- Adds a positional parameter to the buffer. local function addPositional(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = val end -- Adds a named parameter to the buffer. We assume that the parameter name -- is the same as the argument key. local function addNamed(key) local val = args[key] if not val then return nil end checkArg(key, val, 4) ret[#ret + 1] = key .. '=' .. val end -- Filename checkArg('file', args.file, 3) ret[#ret + 1] = 'File:' .. args.file -- Format if args.format then checkArg('format', args.format) if args.formatfile then checkArg('formatfile', args.formatfile) ret[#ret + 1] = args.format .. '=' .. args.formatfile else ret[#ret + 1] = args.format end end -- Border if yesno(args.border) then ret[#ret + 1] = 'border' end addPositional('location') addPositional('alignment') addPositional('size') addNamed('upright') addNamed('link') addNamed('alt') addNamed('page') addNamed('class') addNamed('lang') addNamed('start') addNamed('end') addNamed('thumbtime') addPositional('caption') return string.format('[[%s]]', table.concat(ret, '|')) end function p.main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:File link' }) if not origArgs.file then error("'file' parameter missing from [[Template:File link]]", 0) end -- Copy the arguments that were passed to a new table to avoid looking up -- every possible parameter in the frame object. local args = {} for k, v in pairs(origArgs) do -- Make _BLANK a special argument to add a blank parameter. For use in -- conditional templates etc. it is useful for blank arguments to be -- ignored, but we still need a way to specify them so that we can do -- things like [[File:Example.png|link=]]. if v == '_BLANK' then v = '' end args[k] = v end return p._main(args) end return p 66925f088d11530f2482f04181a3baaaa0ad3d0c Module:Format link 828 875 1728 1727 2023-07-15T16:48:35Z Richard Robin 2 已从[[:wikipedia:Module:Format_link]]导入1个版本 Scribunto text/plain -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end local function maybeItalicize(s, shouldItalicize) -- Italicize s if s is a string and the shouldItalicize parameter is true. if s and shouldItalicize then return '<i>' .. s .. '</i>' else return s end end local function parseLink(link) -- Parse a link and return a table with the link's components. -- These components are: -- - link: the link, stripped of any initial colon (always present) -- - page: the page name (always present) -- - section: the page name (may be nil) -- - display: the display text, if manually entered after a pipe (may be nil) link = removeInitialColon(link) -- Find whether a faux display value has been added with the {{!}} magic -- word. local prePipe, display = link:match('^(.-)|(.*)$') link = prePipe or link -- Find the page, if it exists. -- For links like [[#Bar]], the page will be nil. local preHash, postHash = link:match('^(.-)#(.*)$') local page if not preHash then -- We have a link like [[Foo]]. page = link elseif preHash ~= '' then -- We have a link like [[Foo#Bar]]. page = preHash end -- Find the section, if it exists. local section if postHash and postHash ~= '' then section = postHash end return { link = link, page = page, section = section, display = display, } end local function formatDisplay(parsed, options) -- Formats a display string based on a parsed link table (matching the -- output of parseLink) and an options table (matching the input options for -- _formatLink). local page = maybeItalicize(parsed.page, options.italicizePage) local section = maybeItalicize(parsed.section, options.italicizeSection) if (not section) then return page elseif (not page) then return mw.ustring.format('§&nbsp;%s', section) else return mw.ustring.format('%s §&nbsp;%s', page, section) end end local function missingArgError(target) mError = require('Module:Error') return mError.error{message = 'Error: no link or target specified! ([[' .. target .. '#Errors|help]])' } end -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.formatLink(frame) -- The formatLink export function, for use in templates. yesno = require('Module:Yesno') local args = getArgs(frame) local link = args[1] or args.link local target = args[3] or args.target if not (link or target) then return missingArgError('Template:Format link') end return p._formatLink{ link = link, display = args[2] or args.display, target = target, italicizePage = yesno(args.italicizepage), italicizeSection = yesno(args.italicizesection), categorizeMissing = args.categorizemissing } end function p._formatLink(options) -- The formatLink export function, for use in modules. checkType('_formatLink', 1, options, 'table') local function check(key, expectedType) --for brevity checkTypeForNamedArg( '_formatLink', key, options[key], expectedType or 'string', true ) end check('link') check('display') check('target') check('italicizePage', 'boolean') check('italicizeSection', 'boolean') check('categorizeMissing') -- Normalize link and target and check that at least one is present if options.link == '' then options.link = nil end if options.target == '' then options.target = nil end if not (options.link or options.target) then return missingArgError('Module:Format link') end local parsed = parseLink(options.link) local display = options.display or parsed.display local catMissing = options.categorizeMissing local category = '' -- Find the display text if not display then display = formatDisplay(parsed, options) end -- Handle the target option if present if options.target then local parsedTarget = parseLink(options.target) parsed.link = parsedTarget.link parsed.page = parsedTarget.page end -- Test if page exists if a diagnostic category is specified if catMissing and (mw.ustring.len(catMissing) > 0) then local title = nil if parsed.page then title = mw.title.new(parsed.page) end if title and (not title.isExternal) then local success, exists = pcall(function() return title.exists end) if success and not exists then category = mw.ustring.format('[[Category:%s]]', catMissing) end end end -- Format the result as a link if parsed.link == display then return mw.ustring.format('[[:%s]]%s', parsed.link, category) else return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category) end end -------------------------------------------------------------------------------- -- Derived convenience functions -------------------------------------------------------------------------------- function p.formatPages(options, pages) -- Formats an array of pages using formatLink and the given options table, -- and returns it as an array. Nil values are not allowed. local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink{ link = page, categorizeMissing = options.categorizeMissing, italicizePage = options.italicizePage, italicizeSection = options.italicizeSection } end return ret end return p 1253bdd2683ee4badc33856bfd5499b09a7dca1f Module:Hatnote 828 876 1730 1729 2023-07-15T16:48:35Z Richard Robin 2 已从[[:wikipedia:Module:Hatnote]]导入1个版本 Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules. -- -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local yesno -- lazily initialise [[Module:Yesno]] local formatLink -- lazily initialise [[Module:Format link]] ._formatLink local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline) -- Provides the default hatnote classes as a space-separated string; useful -- for hatnote-manipulation modules like [[Module:Hatnote group]]. return (inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' .. 'navigation-not-searchable' end function p.disambiguate(page, disambiguator) -- Formats a page title with a disambiguation parenthetical, -- i.e. "Example" → "Example (disambiguation)". checkType('disambiguate', 1, page, 'string') checkType('disambiguate', 2, disambiguator, 'string', true) disambiguator = disambiguator or 'disambiguation' return mw.ustring.format('%s (%s)', page, disambiguator) end function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to false. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end function p.makeWikitextError(msg, helpLink, addTrackingCategory, title) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- [[Module:Yesno]], and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') title = title or mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' ([[' .. helpLink .. '|help]])' else helpText = '' end -- Make the category text. local category if not title.isTalkPage -- Don't categorise talk pages and title.namespace ~= 2 -- Don't categorise userspace and yesno(addTrackingCategory) ~= false -- Allow opting out then category = 'Hatnote templates with errors' category = mw.ustring.format( '[[%s:%s]]', mw.site.namespaces[14].name, category ) else category = '' end return mw.ustring.format( '<strong class="error">Error: %s%s.</strong>%s', msg, helpText, category ) end local curNs = mw.title.getCurrentTitle().namespace p.missingTargetCat = --Default missing target category, exported for use in related modules ((curNs == 0) or (curNs == 14)) and 'Articles with hatnote templates targeting a nonexistent page' or nil function p.quote(title) --Wraps titles in quotation marks. If the title starts/ends with a quotation --mark, kerns that side as with {{-'}} local quotationMarks = { ["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true } local quoteLeft, quoteRight = -- Test if start/end are quotation marks quotationMarks[string.sub(title, 1, 1)], quotationMarks[string.sub(title, -1, -1)] if quoteLeft or quoteRight then title = mw.html.create("span"):wikitext(title) end if quoteLeft then title:css("padding-left", "0.15em") end if quoteRight then title:css("padding-right", "0.15em") end return '"' .. tostring(title) .. '"' end -------------------------------------------------------------------------------- -- Hatnote -- -- Produces standard hatnote text. Implements the {{hatnote}} template. -------------------------------------------------------------------------------- function p.hatnote(frame) local args = getArgs(frame) local s = args[1] if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end return p._hatnote(s, { extraclasses = args.extraclasses, selfref = args.selfref }) end function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) options = options or {} local inline = options.inline local hatnote = mw.html.create(inline == 1 and 'span' or 'div') local extraclasses if type(options.extraclasses) == 'string' then extraclasses = options.extraclasses end hatnote :attr('role', 'note') :addClass(p.defaultClasses(inline)) :addClass(extraclasses) :addClass(options.selfref and 'selfref' or nil) :wikitext(s) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' } } .. tostring(hatnote) end return p 3ae1ed7094c5005ca0896395ec9a587287a0bef1 Module:Hatnote/styles.css 828 877 1732 1731 2023-07-15T16:48:36Z Richard Robin 2 已从[[:wikipedia:Module:Hatnote/styles.css]]导入1个版本 sanitized-css text/css /* {{pp|small=y}} */ .hatnote { font-style: italic; } /* Limit structure CSS to divs because of [[Module:Hatnote inline]] */ div.hatnote { /* @noflip */ padding-left: 1.6em; margin-bottom: 0.5em; } .hatnote i { font-style: normal; } /* The templatestyles element inserts a link element before hatnotes. * TODO: Remove link if/when WMF resolves T200206 */ .hatnote + link + .hatnote { margin-top: -0.5em; } 44680ffd6e888866df2cdfa0341af9c7b97da94c Module:Hatnote list 828 878 1734 1733 2023-07-15T16:48:37Z Richard Robin 2 已从[[:wikipedia:Module:Hatnote_list]]导入1个版本 Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote list -- -- -- -- This module produces and formats lists for use in hatnotes. In particular, -- -- it implements the for-see list, i.e. lists of "For X, see Y" statements, -- -- as used in {{about}}, {{redirect}}, and their variants. Also introduced -- -- are andList & orList helpers for formatting lists with those conjunctions. -- -------------------------------------------------------------------------------- local mArguments --initialize lazily local mFormatLink = require('Module:Format link') local mHatnote = require('Module:Hatnote') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} -------------------------------------------------------------------------------- -- List stringification helper functions -- -- These functions are used for stringifying lists, usually page lists inside -- the "Y" portion of "For X, see Y" for-see items. -------------------------------------------------------------------------------- --default options table used across the list stringification functions local stringifyListDefaultOptions = { conjunction = "and", separator = ",", altSeparator = ";", space = " ", formatted = false } --Searches display text only local function searchDisp(haystack, needle) return string.find( string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle ) end -- Stringifies a list generically; probably shouldn't be used directly local function stringifyList(list, options) -- Type-checks, defaults, and a shortcut checkType("stringifyList", 1, list, "table") if #list == 0 then return nil end checkType("stringifyList", 2, options, "table", true) options = options or {} for k, v in pairs(stringifyListDefaultOptions) do if options[k] == nil then options[k] = v end end local s = options.space -- Format the list if requested if options.formatted then list = mFormatLink.formatPages( {categorizeMissing = mHatnote.missingTargetCat}, list ) end -- Set the separator; if any item contains it, use the alternate separator local separator = options.separator for k, v in pairs(list) do if searchDisp(v, separator) then separator = options.altSeparator break end end -- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§" local conjunction = s .. options.conjunction .. s if #list == 2 and searchDisp(list[1], "§") or #list > 2 then conjunction = separator .. conjunction end -- Return the formatted string return mw.text.listToText(list, separator .. s, conjunction) end --DRY function function p.conjList (conj, list, fmt) return stringifyList(list, {conjunction = conj, formatted = fmt}) end -- Stringifies lists with "and" or "or" function p.andList (...) return p.conjList("and", ...) end function p.orList (...) return p.conjList("or", ...) end -------------------------------------------------------------------------------- -- For see -- -- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the -- {{about}} and {{redirect}} templates and their variants. -------------------------------------------------------------------------------- --default options table used across the forSee family of functions local forSeeDefaultOptions = { andKeyword = 'and', title = mw.title.getCurrentTitle().text, otherText = 'other uses', forSeeForm = 'For %s, see %s.', } --Collapses duplicate punctuation local function punctuationCollapse (text) local replacements = { ["%.%.$"] = ".", ["%?%.$"] = "?", ["%!%.$"] = "!", ["%.%]%]%.$"] = ".]]", ["%?%]%]%.$"] = "?]]", ["%!%]%]%.$"] = "!]]" } for k, v in pairs(replacements) do text = string.gsub(text, k, v) end return text end -- Structures arguments into a table for stringification, & options function p.forSeeArgsToTable (args, from, options) -- Type-checks and defaults checkType("forSeeArgsToTable", 1, args, 'table') checkType("forSeeArgsToTable", 2, from, 'number', true) from = from or 1 checkType("forSeeArgsToTable", 3, options, 'table', true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- maxArg's gotten manually because getArgs() and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k) == 'number' and k > maxArg then maxArg = k end end -- Structure the data out from the parameter list: -- * forTable is the wrapper table, with forRow rows -- * Rows are tables of a "use" string & a "pages" table of pagename strings -- * Blanks are left empty for defaulting elsewhere, but can terminate list local forTable = {} local i = from local terminated = false -- If there is extra text, and no arguments are given, give nil value -- to not produce default of "For other uses, see foo (disambiguation)" if options.extratext and i > maxArg then return nil end -- Loop to generate rows repeat -- New empty row local forRow = {} -- On blank use, assume list's ended & break at end of this loop forRow.use = args[i] if not args[i] then terminated = true end -- New empty list of pages forRow.pages = {} -- Insert first pages item if present table.insert(forRow.pages, args[i + 1]) -- If the param after next is "and", do inner loop to collect params -- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} while args[i + 2] == options.andKeyword do if args[i + 3] then table.insert(forRow.pages, args[i + 3]) end -- Increment to next "and" i = i + 2 end -- Increment to next use i = i + 2 -- Append the row table.insert(forTable, forRow) until terminated or i > maxArg return forTable end -- Stringifies a table as formatted by forSeeArgsToTable function p.forSeeTableToString (forSeeTable, options) -- Type-checks and defaults checkType("forSeeTableToString", 1, forSeeTable, "table", true) checkType("forSeeTableToString", 2, options, "table", true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- Stringify each for-see item into a list local strList = {} if forSeeTable then for k, v in pairs(forSeeTable) do local useStr = v.use or options.otherText local pagesStr = p.andList(v.pages, true) or mFormatLink._formatLink{ categorizeMissing = mHatnote.missingTargetCat, link = mHatnote.disambiguate(options.title) } local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr) forSeeStr = punctuationCollapse(forSeeStr) table.insert(strList, forSeeStr) end end if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end -- Return the concatenated list return table.concat(strList, ' ') end -- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps -- but not blank/whitespace values. Ignores named args and args < "from". function p._forSee (args, from, options) local forSeeTable = p.forSeeArgsToTable(args, from, options) return p.forSeeTableToString(forSeeTable, options) end -- As _forSee, but uses the frame. function p.forSee (frame, from, options) mArguments = require('Module:Arguments') return p._forSee(mArguments.getArgs(frame), from, options) end return p d0828422b1aa0d0d0092d699d059c9e882260398 Module:Labelled list hatnote 828 879 1736 1735 2023-07-15T16:48:37Z Richard Robin 2 已从[[:wikipedia:Module:Labelled_list_hatnote]]导入1个版本 Scribunto text/plain -------------------------------------------------------------------------------- -- Labelled list -- -- -- -- This module does the core work of creating a hatnote composed of a list -- -- prefixed by a colon-terminated label, i.e. "LABEL: [andList of pages]", -- -- for {{see also}} and similar templates. -- -------------------------------------------------------------------------------- local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mArguments --initialize lazily local yesno --initialize lazily local p = {} -- Defaults global to this module local defaults = { label = 'See also', --Final fallback for label argument labelForm = '%s: %s', prefixes = {'label', 'label ', 'l'}, template = 'Module:Labelled list hatnote' } -- Localizable message strings local msg = { errorSuffix = '#Errors', noInputWarning = 'no page names specified', noOutputWarning = "'''[[%s]] — no output: none of the target pages exist.'''" } -- Helper function that pre-combines display parameters into page arguments. -- Also compresses sparse arrays, as a desirable side-effect. function p.preprocessDisplays (args, prefixes) -- Prefixes specify which parameters, in order, to check for display options -- They each have numbers auto-appended, e.g. 'label1', 'label 1', & 'l1' prefixes = prefixes or defaults.prefixes local indices = {} local sparsePages = {} for k, v in pairs(args) do if type(k) == 'number' then indices[#indices + 1] = k local display for i = 1, #prefixes do display = args[prefixes[i] .. k] if display then break end end sparsePages[k] = display and string.format('%s|%s', string.gsub(v, '|.*$', ''), display) or v end end table.sort(indices) local pages = {} for k, v in ipairs(indices) do pages[#pages + 1] = sparsePages[v] end return pages end --Helper function to get a page target from a processed page string --e.g. "Page|Label" → "Page" or "Target" → "Target" local function getTarget(pagename) local pipe = string.find(pagename, '|') return string.sub(pagename, 0, pipe and pipe - 1 or nil) end -- Produces a labelled pages-list hatnote. -- The main frame (template definition) takes 1 or 2 arguments, for a singular -- and (optionally) plural label respectively: -- * {{#invoke:Labelled list hatnote|labelledList|Singular label|Plural label}} -- The resulting template takes pagename & label parameters normally. function p.labelledList (frame) mArguments = require('Module:Arguments') yesno = require('Module:Yesno') local labels = {frame.args[1] or defaults.label} labels[2] = frame.args[2] or labels[1] labels[3] = frame.args[3] --no defaulting labels[4] = frame.args[4] --no defaulting local template = frame:getParent():getTitle() local args = mArguments.getArgs(frame, {parentOnly = true}) local pages = p.preprocessDisplays(args) local options = { category = yesno(args.category), extraclasses = frame.args.extraclasses, ifexists = yesno(frame.args.ifexists), namespace = frame.args.namespace or args.namespace, selfref = yesno(frame.args.selfref or args.selfref), template = template } return p._labelledList(pages, labels, options) end function p._labelledList (pages, labels, options) if options.ifexists then for k = #pages, 1, -1 do --iterate backwards to allow smooth removals local v = pages[k] local title = mw.title.new(getTarget(v), namespace) if (v == '') or title == nil or not title.exists then table.remove(pages, k) end end end labels = labels or {} label = (#pages == 1 and labels[1] or labels[2]) or defaults.label for k, v in pairs(pages) do if mHatnote.findNamespaceId(v) ~= 0 then label = ( #pages == 1 and (labels[3] or labels[1] or defaults.label) or (labels[4] or labels[2] or defaults.label) ) or defaults.label end end if #pages == 0 then if options.ifexists then mw.addWarning( string.format( msg.noOutputWarning, options.template or defaults.template ) ) return '' else return mHatnote.makeWikitextError( msg.noInputWarning, (options.template or defaults.template) .. msg.errorSuffix, options.category ) end end local text = string.format( options.labelForm or defaults.labelForm, label, mHatlist.andList(pages, true) ) local hnOptions = { extraclasses = options.extraclasses, selfref = options.selfref } return mHatnote._hatnote(text, hnOptions) end return p b7a8ba27cf6195e6427701b94e8d2acad3c40a21 Module:Navbar 828 880 1738 1737 2023-07-15T16:48:37Z Richard Robin 2 已从[[:wikipedia:Module:Navbar]]导入1个版本 Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = title:fullUrl('action=edit'), ['url'] = true }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = title:fullUrl('action=history'), ['url'] = true }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 79f907e59eaa8bbf8dd50bb751933ebeaaa7eb17 Module:Navbar/configuration 828 881 1740 1739 2023-07-15T16:48:38Z Richard Robin 2 已从[[:wikipedia:Module:Navbar/configuration]]导入1个版本 Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } b007c336b17ec4bcd4d5a9dca9f8cba301662b55 Module:Navbar/styles.css 828 882 1742 1741 2023-07-15T16:48:38Z Richard Robin 2 已从[[:wikipedia:Module:Navbar/styles.css]]导入1个版本 sanitized-css text/css /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } 9d4056f949b4f0b159e3d40dfb1a5f01e72f9571 Module:Navbox 828 883 1744 1743 2023-07-15T16:48:39Z Richard Robin 2 已从[[:wikipedia:Module:Navbox]]导入1个版本 Scribunto text/plain require('strict') local p = {} local navbar = require('Module:Navbar')._navbar local cfg = mw.loadData('Module:Navbox/configuration') local getArgs -- lazily initialized local args local format = string.format local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end local function renderNavBar(titleCell) if has_navbar() then titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') .. ';background:none transparent;border:none;box-shadow:none;padding:0;' }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and mw.uri.anchorEncode(args[cfg.arg.above]) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end function p._navbox(navboxArgs) args = navboxArgs local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[cfg.arg.title] _ = args[cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[format(cfg.arg.group_and_num, i)] _ = args[format(cfg.arg.list_and_num, i)] end _ = args[cfg.arg.below] return p._navbox(args) end return p 05be9a97c035ab3f0fac69423779e261949d473c Module:Navbox/configuration 828 884 1746 1745 2023-07-15T16:48:39Z Richard Robin 2 已从[[:wikipedia:Module:Navbox/configuration]]导入1个版本 Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagesetyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 4148736fd32a93636c0413e73ed38afaef065ec9 Module:Navbox/styles.css 828 885 1748 1747 2023-07-15T16:48:40Z Richard Robin 2 已从[[:wikipedia:Module:Navbox/styles.css]]导入1个版本 sanitized-css text/css /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } e80b0d7a5770e6e105dab832deb6c37a5245ebc6 Module:Protection banner 828 886 1750 1749 2023-07-15T16:48:40Z Richard Robin 2 已从[[:wikipedia:Module:Protection_banner]]导入1个版本 Scribunto text/plain -- This module implements {{pp-meta}} and its daughter templates such as -- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}. -- Initialise necessary modules. require('strict') local makeFileLink = require('Module:File link')._main local effectiveProtectionLevel = require('Module:Effective protection level')._main local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main local yesno = require('Module:Yesno') -- Lazily initialise modules and objects we don't always need. local getArgs, makeMessageBox, lang -- Set constants. local CONFIG_MODULE = 'Module:Protection banner/config' -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function makeCategoryLink(cat, sort) if cat then return string.format( '[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, sort ) end end -- Validation function for the expiry and the protection date local function validateDate(dateString, dateType) if not lang then lang = mw.language.getContentLanguage() end local success, result = pcall(lang.formatDate, lang, 'U', dateString) if success then result = tonumber(result) if result then return result end end error(string.format( 'invalid %s: %s', dateType, tostring(dateString) ), 4) end local function makeFullUrl(page, query, display) return string.format( '[%s %s]', tostring(mw.uri.fullUrl(page, query)), display ) end -- Given a directed graph formatted as node -> table of direct successors, -- get a table of all nodes reachable from a given node (though always -- including the given node). local function getReachableNodes(graph, start) local toWalk, retval = {[start] = true}, {} while true do -- Can't use pairs() since we're adding and removing things as we're iterating local k = next(toWalk) -- This always gets the "first" key if k == nil then return retval end toWalk[k] = nil retval[k] = true for _,v in ipairs(graph[k]) do if not retval[v] then toWalk[v] = true end end end end -------------------------------------------------------------------------------- -- Protection class -------------------------------------------------------------------------------- local Protection = {} Protection.__index = Protection Protection.supportedActions = { edit = true, move = true, autoreview = true, upload = true } Protection.bannerConfigFields = { 'text', 'explanation', 'tooltip', 'alt', 'link', 'image' } function Protection.new(args, cfg, title) local obj = {} obj._cfg = cfg obj.title = title or mw.title.getCurrentTitle() -- Set action if not args.action then obj.action = 'edit' elseif Protection.supportedActions[args.action] then obj.action = args.action else error(string.format( 'invalid action: %s', tostring(args.action) ), 3) end -- Set level obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title) if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then -- Users need to be autoconfirmed to move pages anyway, so treat -- semi-move-protected pages as unprotected. obj.level = '*' end -- Set expiry local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title) if effectiveExpiry == 'infinity' then obj.expiry = 'indef' elseif effectiveExpiry ~= 'unknown' then obj.expiry = validateDate(effectiveExpiry, 'expiry date') end -- Set reason if args[1] then obj.reason = mw.ustring.lower(args[1]) if obj.reason:find('|') then error('reasons cannot contain the pipe character ("|")', 3) end end -- Set protection date if args.date then obj.protectionDate = validateDate(args.date, 'protection date') end -- Set banner config do obj.bannerConfig = {} local configTables = {} if cfg.banners[obj.action] then configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason] end if cfg.defaultBanners[obj.action] then configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level] configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default end configTables[#configTables + 1] = cfg.masterBanner for i, field in ipairs(Protection.bannerConfigFields) do for j, t in ipairs(configTables) do if t[field] then obj.bannerConfig[field] = t[field] break end end end end return setmetatable(obj, Protection) end function Protection:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- Get the expiry key fragment. local expiryFragment if self.expiry == 'indef' then expiryFragment = self.expiry elseif type(self.expiry) == 'number' then expiryFragment = 'temp' end -- Get the namespace key fragment. local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace] if not namespaceFragment and title.namespace % 2 == 1 then namespaceFragment = 'talk' end -- Define the order that key fragments are tested in. This is done with an -- array of tables containing the value to be tested, along with its -- position in the cfg.protectionCategories table. local order = { {val = expiryFragment, keypos = 1}, {val = namespaceFragment, keypos = 2}, {val = self.reason, keypos = 3}, {val = self.level, keypos = 4}, {val = self.action, keypos = 5} } --[[ -- The old protection templates used an ad-hoc protection category system, -- with some templates prioritising namespaces in their categories, and -- others prioritising the protection reason. To emulate this in this module -- we use the config table cfg.reasonsWithNamespacePriority to set the -- reasons for which namespaces have priority over protection reason. -- If we are dealing with one of those reasons, move the namespace table to -- the end of the order table, i.e. give it highest priority. If not, the -- reason should have highest priority, so move that to the end of the table -- instead. --]] table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3)) --[[ -- Define the attempt order. Inactive subtables (subtables with nil "value" -- fields) are moved to the end, where they will later be given the key -- "all". This is to cut down on the number of table lookups in -- cfg.protectionCategories, which grows exponentially with the number of -- non-nil keys. We keep track of the number of active subtables with the -- noActive parameter. --]] local noActive, attemptOrder do local active, inactive = {}, {} for i, t in ipairs(order) do if t.val then active[#active + 1] = t else inactive[#inactive + 1] = t end end noActive = #active attemptOrder = active for i, t in ipairs(inactive) do attemptOrder[#attemptOrder + 1] = t end end --[[ -- Check increasingly generic key combinations until we find a match. If a -- specific category exists for the combination of key fragments we are -- given, that match will be found first. If not, we keep trying different -- key fragment combinations until we match using the key -- "all-all-all-all-all". -- -- To generate the keys, we index the key subtables using a binary matrix -- with indexes i and j. j is only calculated up to the number of active -- subtables. For example, if there were three active subtables, the matrix -- would look like this, with 0 corresponding to the key fragment "all", and -- 1 corresponding to other key fragments. -- -- j 1 2 3 -- i -- 1 1 1 1 -- 2 0 1 1 -- 3 1 0 1 -- 4 0 0 1 -- 5 1 1 0 -- 6 0 1 0 -- 7 1 0 0 -- 8 0 0 0 -- -- Values of j higher than the number of active subtables are set -- to the string "all". -- -- A key for cfg.protectionCategories is constructed for each value of i. -- The position of the value in the key is determined by the keypos field in -- each subtable. --]] local cats = cfg.protectionCategories for i = 1, 2^noActive do local key = {} for j, t in ipairs(attemptOrder) do if j > noActive then key[t.keypos] = 'all' else local quotient = i / 2 ^ (j - 1) quotient = math.ceil(quotient) if quotient % 2 == 1 then key[t.keypos] = t.val else key[t.keypos] = 'all' end end end key = table.concat(key, '|') local attempt = cats[key] if attempt then return makeCategoryLink(attempt, title.text) end end return '' end function Protection:isIncorrect() local expiry = self.expiry return not self:shouldHaveProtectionCategory() or type(expiry) == 'number' and expiry < os.time() end function Protection:isTemplateProtectedNonTemplate() local action, namespace = self.action, self.title.namespace return self.level == 'templateeditor' and ( (action ~= 'edit' and action ~= 'move') or (namespace ~= 10 and namespace ~= 828) ) end function Protection:makeCategoryLinks() local msg = self._cfg.msg local ret = {self:makeProtectionCategory()} if self:isIncorrect() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-incorrect'], self.title.text ) end if self:isTemplateProtectedNonTemplate() then ret[#ret + 1] = makeCategoryLink( msg['tracking-category-template'], self.title.text ) end return table.concat(ret) end -------------------------------------------------------------------------------- -- Blurb class -------------------------------------------------------------------------------- local Blurb = {} Blurb.__index = Blurb Blurb.bannerTextFields = { text = true, explanation = true, tooltip = true, alt = true, link = true } function Blurb.new(protectionObj, args, cfg) return setmetatable({ _cfg = cfg, _protectionObj = protectionObj, _args = args }, Blurb) end -- Private methods -- function Blurb:_formatDate(num) -- Formats a Unix timestamp into dd Month, YYYY format. lang = lang or mw.language.getContentLanguage() local success, date = pcall( lang.formatDate, lang, self._cfg.msg['expiry-date-format'] or 'j F Y', '@' .. tostring(num) ) if success then return date end end function Blurb:_getExpandedMessage(msgKey) return self:_substituteParameters(self._cfg.msg[msgKey]) end function Blurb:_substituteParameters(msg) if not self._params then local parameterFuncs = {} parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter parameterFuncs.EDITREQUEST = self._makeEditRequestParameter parameterFuncs.EXPIRY = self._makeExpiryParameter parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter parameterFuncs.IMAGELINK = self._makeImageLinkParameter parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter parameterFuncs.PAGETYPE = self._makePagetypeParameter parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter parameterFuncs.TALKPAGE = self._makeTalkPageParameter parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter parameterFuncs.VANDAL = self._makeVandalTemplateParameter self._params = setmetatable({}, { __index = function (t, k) local param if parameterFuncs[k] then param = parameterFuncs[k](self) end param = param or '' t[k] = param return param end }) end msg = msg:gsub('${(%u+)}', self._params) return msg end function Blurb:_makeCurrentVersionParameter() -- A link to the page history or the move log, depending on the kind of -- protection. local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'move' then -- We need the move log link. return makeFullUrl( 'Special:Log', {type = 'move', page = pagename}, self:_getExpandedMessage('current-version-move-display') ) else -- We need the history link. return makeFullUrl( pagename, {action = 'history'}, self:_getExpandedMessage('current-version-edit-display') ) end end function Blurb:_makeEditRequestParameter() local mEditRequest = require('Module:Submit an edit request') local action = self._protectionObj.action local level = self._protectionObj.level -- Get the edit request type. local requestType if action == 'edit' then if level == 'autoconfirmed' then requestType = 'semi' elseif level == 'extendedconfirmed' then requestType = 'extended' elseif level == 'templateeditor' then requestType = 'template' end end requestType = requestType or 'full' -- Get the display value. local display = self:_getExpandedMessage('edit-request-display') return mEditRequest._link{type = requestType, display = display} end function Blurb:_makeExpiryParameter() local expiry = self._protectionObj.expiry if type(expiry) == 'number' then return self:_formatDate(expiry) else return expiry end end function Blurb:_makeExplanationBlurbParameter() -- Cover special cases first. if self._protectionObj.title.namespace == 8 then -- MediaWiki namespace return self:_getExpandedMessage('explanation-blurb-nounprotect') end -- Get explanation blurb table keys local action = self._protectionObj.action local level = self._protectionObj.level local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject' -- Find the message in the explanation blurb table and substitute any -- parameters. local explanations = self._cfg.explanationBlurbs local msg if explanations[action][level] and explanations[action][level][talkKey] then msg = explanations[action][level][talkKey] elseif explanations[action][level] and explanations[action][level].default then msg = explanations[action][level].default elseif explanations[action].default and explanations[action].default[talkKey] then msg = explanations[action].default[talkKey] elseif explanations[action].default and explanations[action].default.default then msg = explanations[action].default.default else error(string.format( 'could not find explanation blurb for action "%s", level "%s" and talk key "%s"', action, level, talkKey ), 8) end return self:_substituteParameters(msg) end function Blurb:_makeImageLinkParameter() local imageLinks = self._cfg.imageLinks local action = self._protectionObj.action local level = self._protectionObj.level local msg if imageLinks[action][level] then msg = imageLinks[action][level] elseif imageLinks[action].default then msg = imageLinks[action].default else msg = imageLinks.edit.default end return self:_substituteParameters(msg) end function Blurb:_makeIntroBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-blurb-expiry') else return self:_getExpandedMessage('intro-blurb-noexpiry') end end function Blurb:_makeIntroFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('intro-fragment-expiry') else return self:_getExpandedMessage('intro-fragment-noexpiry') end end function Blurb:_makePagetypeParameter() local pagetypes = self._cfg.pagetypes return pagetypes[self._protectionObj.title.namespace] or pagetypes.default or error('no default pagetype defined', 8) end function Blurb:_makeProtectionBlurbParameter() local protectionBlurbs = self._cfg.protectionBlurbs local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionBlurbs[action][level] then msg = protectionBlurbs[action][level] elseif protectionBlurbs[action].default then msg = protectionBlurbs[action].default elseif protectionBlurbs.edit.default then msg = protectionBlurbs.edit.default else error('no protection blurb defined for protectionBlurbs.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionDateParameter() local protectionDate = self._protectionObj.protectionDate if type(protectionDate) == 'number' then return self:_formatDate(protectionDate) else return protectionDate end end function Blurb:_makeProtectionLevelParameter() local protectionLevels = self._cfg.protectionLevels local action = self._protectionObj.action local level = self._protectionObj.level local msg if protectionLevels[action][level] then msg = protectionLevels[action][level] elseif protectionLevels[action].default then msg = protectionLevels[action].default elseif protectionLevels.edit.default then msg = protectionLevels.edit.default else error('no protection level defined for protectionLevels.edit.default', 8) end return self:_substituteParameters(msg) end function Blurb:_makeProtectionLogParameter() local pagename = self._protectionObj.title.prefixedText if self._protectionObj.action == 'autoreview' then -- We need the pending changes log. return makeFullUrl( 'Special:Log', {type = 'stable', page = pagename}, self:_getExpandedMessage('pc-log-display') ) else -- We need the protection log. return makeFullUrl( 'Special:Log', {type = 'protect', page = pagename}, self:_getExpandedMessage('protection-log-display') ) end end function Blurb:_makeTalkPageParameter() return string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[self._protectionObj.title.namespace].talk.name, self._protectionObj.title.text, self._args.section or 'top', self:_getExpandedMessage('talk-page-link-display') ) end function Blurb:_makeTooltipBlurbParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-blurb-expiry') else return self:_getExpandedMessage('tooltip-blurb-noexpiry') end end function Blurb:_makeTooltipFragmentParameter() if self._protectionObj:isTemporary() then return self:_getExpandedMessage('tooltip-fragment-expiry') else return self:_getExpandedMessage('tooltip-fragment-noexpiry') end end function Blurb:_makeVandalTemplateParameter() return mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={self._args.user or self._protectionObj.title.baseText} } end -- Public methods -- function Blurb:makeBannerText(key) -- Validate input. if not key or not Blurb.bannerTextFields[key] then error(string.format( '"%s" is not a valid banner config field', tostring(key) ), 2) end -- Generate the text. local msg = self._protectionObj.bannerConfig[key] if type(msg) == 'string' then return self:_substituteParameters(msg) elseif type(msg) == 'function' then msg = msg(self._protectionObj, self._args) if type(msg) ~= 'string' then error(string.format( 'bad output from banner config function with key "%s"' .. ' (expected string, got %s)', tostring(key), type(msg) ), 4) end return self:_substituteParameters(msg) end end -------------------------------------------------------------------------------- -- BannerTemplate class -------------------------------------------------------------------------------- local BannerTemplate = {} BannerTemplate.__index = BannerTemplate function BannerTemplate.new(protectionObj, cfg) local obj = {} obj._cfg = cfg -- Set the image filename. local imageFilename = protectionObj.bannerConfig.image if imageFilename then obj._imageFilename = imageFilename else -- If an image filename isn't specified explicitly in the banner config, -- generate it from the protection status and the namespace. local action = protectionObj.action local level = protectionObj.level local namespace = protectionObj.title.namespace local reason = protectionObj.reason -- Deal with special cases first. if ( namespace == 10 or namespace == 828 or reason and obj._cfg.indefImageReasons[reason] ) and action == 'edit' and level == 'sysop' and not protectionObj:isTemporary() then -- Fully protected modules and templates get the special red "indef" -- padlock. obj._imageFilename = obj._cfg.msg['image-filename-indef'] else -- Deal with regular protection types. local images = obj._cfg.images if images[action] then if images[action][level] then obj._imageFilename = images[action][level] elseif images[action].default then obj._imageFilename = images[action].default end end end end return setmetatable(obj, BannerTemplate) end function BannerTemplate:renderImage() local filename = self._imageFilename or self._cfg.msg['image-filename-default'] or 'Transparent.gif' return makeFileLink{ file = filename, size = (self.imageWidth or 20) .. 'px', alt = self._imageAlt, link = self._imageLink, caption = self.imageCaption } end -------------------------------------------------------------------------------- -- Banner class -------------------------------------------------------------------------------- local Banner = setmetatable({}, BannerTemplate) Banner.__index = Banner function Banner.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 40 obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip. obj._reasonText = blurbObj:makeBannerText('text') obj._explanationText = blurbObj:makeBannerText('explanation') obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing. return setmetatable(obj, Banner) end function Banner:__tostring() -- Renders the banner. makeMessageBox = makeMessageBox or require('Module:Message box').main local reasonText = self._reasonText or error('no reason text set', 2) local explanationText = self._explanationText local mbargs = { page = self._page, type = 'protection', image = self:renderImage(), text = string.format( "'''%s'''%s", reasonText, explanationText and '<br />' .. explanationText or '' ) } return makeMessageBox('mbox', mbargs) end -------------------------------------------------------------------------------- -- Padlock class -------------------------------------------------------------------------------- local Padlock = setmetatable({}, BannerTemplate) Padlock.__index = Padlock function Padlock.new(protectionObj, blurbObj, cfg) local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb. obj.imageWidth = 20 obj.imageCaption = blurbObj:makeBannerText('tooltip') obj._imageAlt = blurbObj:makeBannerText('alt') obj._imageLink = blurbObj:makeBannerText('link') obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] or cfg.padlockIndicatorNames.default or 'pp-default' return setmetatable(obj, Padlock) end function Padlock:__tostring() local frame = mw.getCurrentFrame() -- The nowiki tag helps prevent whitespace at the top of articles. return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{ name = 'indicator', args = {name = self._indicatorName}, content = self:renderImage() } end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- This is used for testing purposes. return { Protection = Protection, Blurb = Blurb, BannerTemplate = BannerTemplate, Banner = Banner, Padlock = Padlock, } end function p._main(args, cfg, title) args = args or {} cfg = cfg or require(CONFIG_MODULE) local protectionObj = Protection.new(args, cfg, title) local ret = {} -- If a page's edit protection is equally or more restrictive than its -- protection from some other action, then don't bother displaying anything -- for the other action (except categories). if not yesno(args.catonly) and (protectionObj.action == 'edit' or args.demolevel or not getReachableNodes( cfg.hierarchy, protectionObj.level )[effectiveProtectionLevel('edit', protectionObj.title)]) then -- Initialise the blurb object local blurbObj = Blurb.new(protectionObj, args, cfg) -- Render the banner if protectionObj:shouldShowLock() then ret[#ret + 1] = tostring( (yesno(args.small) and Padlock or Banner) .new(protectionObj, blurbObj, cfg) ) end end -- Render the categories if yesno(args.category) ~= false then ret[#ret + 1] = protectionObj:makeCategoryLinks() end return table.concat(ret) end function p.main(frame, cfg) cfg = cfg or require(CONFIG_MODULE) -- Find default args, if any. local parent = frame.getParent and frame:getParent() local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] -- Find user args, and use the parent frame if we are being called from a -- wrapper template. getArgs = getArgs or require('Module:Arguments').getArgs local userArgs = getArgs(frame, { parentOnly = defaultArgs, frameOnly = not defaultArgs }) -- Build the args table. User-specified args overwrite default args. local args = {} for k, v in pairs(defaultArgs or {}) do args[k] = v end for k, v in pairs(userArgs) do args[k] = v end return p._main(args, cfg) end return p 894f0884d4c2da1ce19d385b96f59af654b0946a Module:Protection banner/config 828 887 1752 1751 2023-07-15T16:48:40Z Richard Robin 2 已从[[:wikipedia:Module:Protection_banner/config]]导入1个版本 Scribunto text/plain -- This module provides configuration data for [[Module:Protection banner]]. return { -------------------------------------------------------------------------------- -- -- BANNER DATA -- -------------------------------------------------------------------------------- --[[ -- Banner data consists of six fields: -- * text - the main protection text that appears at the top of protection -- banners. -- * explanation - the text that appears below the main protection text, used -- to explain the details of the protection. -- * tooltip - the tooltip text you see when you move the mouse over a small -- padlock icon. -- * link - the page that the small padlock icon links to. -- * alt - the alt text for the small padlock icon. This is also used as tooltip -- text for the large protection banners. -- * image - the padlock image used in both protection banners and small padlock -- icons. -- -- The module checks in three separate tables to find a value for each field. -- First it checks the banners table, which has values specific to the reason -- for the page being protected. Then the module checks the defaultBanners -- table, which has values specific to each protection level. Finally, the -- module checks the masterBanner table, which holds data for protection -- templates to use if no data has been found in the previous two tables. -- -- The values in the banner data can take parameters. These are specified -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name -- enclosed in curly braces). -- -- Available parameters: -- -- ${CURRENTVERSION} - a link to the page history or the move log, with the -- display message "current-version-edit-display" or -- "current-version-move-display". -- -- ${EDITREQUEST} - a link to create an edit request for the current page. -- -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes -- on the talk page; you may submit a request to ask an administrator to make -- an edit if it is minor or supported by consensus." -- -- ${IMAGELINK} - a link to set the image to, depending on the protection -- action and protection level. -- -- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry -- is set. E.g. "Editing of this page by new or unregistered users is currently -- disabled until dd Month YYYY." -- -- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation -- so that it can be used in run-on sentences. -- -- ${PAGETYPE} - the type of the page, e.g. "article" or "template". -- Defined in the cfg.pagetypes table. -- -- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g. -- "Editing of this page by new or unregistered users is currently disabled" -- -- ${PROTECTIONDATE} - the protection date, if it has been supplied to the -- template. -- -- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or -- "semi-protected". -- -- ${PROTECTIONLOG} - a link to the protection log or the pending changes log, -- depending on the protection action. -- -- ${TALKPAGE} - a link to the talk page. If a section is specified, links -- straight to that talk page section. -- -- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to -- create a blurb like "This template is semi-protected", or "This article is -- move-protected until DD Month YYYY". -- -- ${VANDAL} - links for the specified username (or the root page name) -- using Module:Vandal-m. -- -- Functions -- -- For advanced users, it is possible to use Lua functions instead of strings -- in the banner config tables. Using functions gives flexibility that is not -- possible just by using parameters. Functions take two arguments, the -- protection object and the template arguments, and they must output a string. -- -- For example: -- -- text = function (protectionObj, args) -- if protectionObj.level == 'autoconfirmed' then -- return 'foo' -- else -- return 'bar' -- end -- end -- -- Some protection object properties and methods that may be useful: -- protectionObj.action - the protection action -- protectionObj.level - the protection level -- protectionObj.reason - the protection reason -- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set -- to indefinite, and the protection time in unix time if temporary. -- protectionObj.protectionDate - the protection date in unix time, or nil if -- unspecified. -- protectionObj.bannerConfig - the banner config found by the module. Beware -- of editing the config field used by the function, as it could create an -- infinite loop. -- protectionObj:isProtected - returns a boolean showing whether the page is -- protected. -- protectionObj:isTemporary - returns a boolean showing whether the expiry is -- temporary. -- protectionObj:isIncorrect - returns a boolean showing whether the protection -- template is incorrect. --]] -- The master banner data, used if no values have been found in banners or -- defaultBanners. masterBanner = { text = '${INTROBLURB}', explanation = '${EXPLANATIONBLURB}', tooltip = '${TOOLTIPBLURB}', link = '${IMAGELINK}', alt = 'Page ${PROTECTIONLEVEL}' }, -- The default banner data. This holds banner data for different protection -- levels. -- *required* - this table needs edit, move, autoreview and upload subtables. defaultBanners = { edit = {}, move = {}, autoreview = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.svg' } }, upload = {} }, -- The banner data. This holds banner data for different protection reasons. -- In fact, the reasons specified in this table control which reasons are -- valid inputs to the first positional parameter. -- -- There is also a non-standard "description" field that can be used for items -- in this table. This is a description of the protection reason for use in the -- module documentation. -- -- *required* - this table needs edit, move, autoreview and upload subtables. banners = { edit = { blp = { description = 'For pages protected to promote compliance with the' .. ' [[Wikipedia:Biographies of living persons' .. '|biographies of living persons]] policy', text = '${INTROFRAGMENT} to promote compliance with' .. ' [[Wikipedia:Biographies of living persons' .. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, dmca = { description = 'For pages protected by the Wikimedia Foundation' .. ' due to [[Digital Millennium Copyright Act]] takedown requests', explanation = function (protectionObj, args) local ret = 'Pursuant to a rights owner notice under the Digital' .. ' Millennium Copyright Act (DMCA) regarding some content' .. ' in this article, the Wikimedia Foundation acted under' .. ' applicable law and took down and restricted the content' .. ' in question.' if args.notice then ret = ret .. ' A copy of the received notice can be found here: ' .. args.notice .. '.' end ret = ret .. ' For more information, including websites discussing' .. ' how to file a counter-notice, please see' .. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}." .. "'''Do not remove this template from the article until the" .. " restrictions are withdrawn'''." return ret end, image = 'Office-protection-shackle.svg', }, dispute = { description = 'For pages protected due to editing disputes', text = function (protectionObj, args) -- Find the value of "disputes". local display = 'disputes' local disputes if args.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, args.section, display ) else disputes = display end -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROFRAGMENT} or until editing %s have been resolved.' else msg = '${INTROFRAGMENT} until editing %s have been resolved.' end return string.format(msg, disputes) end, explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', tooltip = '${TOOLTIPFRAGMENT} due to editing disputes', }, ecp = { description = 'For articles in topic areas authorized by' .. ' [[Wikipedia:Arbitration Committee|ArbCom]] or' .. ' meets the criteria for community use', tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', alt = 'Extended-protected ${PAGETYPE}', }, mainpage = { description = 'For pages protected for being displayed on the [[Main Page]]', text = 'This file is currently' .. ' [[Wikipedia:This page is protected|protected]] from' .. ' editing because it is currently or will soon be displayed' .. ' on the [[Main Page]].', explanation = 'Images on the Main Page are protected due to their high' .. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.' .. '<br /><span style="font-size:90%;">' .. "'''Administrators:''' Once this image is definitely off the Main Page," .. ' please unprotect this file, or reduce to semi-protection,' .. ' as appropriate.</span>', }, office = { description = 'For pages protected by the Wikimedia Foundation', text = function (protectionObj, args) local ret = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectionObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end, explanation = "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not remove protection from this" .. " page unless you are authorized by the Wikimedia Foundation to do" .. " so.'''", image = 'Office-protection-shackle.svg', }, reset = { description = 'For pages protected by the Wikimedia Foundation and' .. ' "reset" to a bare-bones version', text = 'This ${PAGETYPE} is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.', explanation = function (protectionObj, args) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was' else ret = ret .. 'This ${PAGETYPE} has been' end ret = ret .. ' reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].' .. ' Standard Wikipedia policies will apply to its rewriting—which' .. ' will eventually be open to all editors—and will be strictly' .. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while' .. ' it is being rebuilt.\n\n' .. 'Any insertion of material directly from' .. ' pre-protection revisions of the ${PAGETYPE} will be removed, as' .. ' will any material added to the ${PAGETYPE} that is not properly' .. ' sourced. The associated talk page(s) were also cleared on the' .. " same date.\n\n" .. "If you can edit this page, please discuss all changes and" .. " additions on the ${TALKPAGE} first. '''Do not override" .. " this action, and do not remove protection from this page," .. " unless you are authorized by the Wikimedia Foundation" .. " to do so. No editor may remove this notice.'''" return ret end, image = 'Office-protection-shackle.svg', }, sock = { description = 'For pages protected due to' .. ' [[Wikipedia:Sock puppetry|sock puppetry]]', text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of' .. ' [[Wikipedia:Blocking policy|blocked]] or' .. ' [[Wikipedia:Banning policy|banned users]]' .. ' from editing it.', tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from' .. ' editing it', }, template = { description = 'For [[Wikipedia:High-risk templates|high-risk]]' .. ' templates and Lua modules', text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},' .. ' as it is [[Wikipedia:High-risk templates|high-risk]].', explanation = 'Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] or' .. ' [[Wikipedia:Template editor|template editor]] to make an edit if' .. ' it is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by' .. ' [[Wikipedia:Consensus|consensus]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}' .. ' to prevent vandalism', alt = 'Permanently protected ${PAGETYPE}', }, usertalk = { description = 'For pages protected against disruptive edits by a' .. ' particular user', text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,' .. ' such as abusing the' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.', explanation = 'If you cannot edit this user talk page and you need to' .. ' make a change or leave a message, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for edits to a protected page' .. '|request an edit]],' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]],' .. ' [[Special:Userlogin|log in]],' .. ' or [[Special:UserLogin/signup|create an account]].', }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism|vandalism]]', text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].', explanation = function (protectionObj, args) local ret = '' if protectionObj.level == 'sysop' then ret = ret .. "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ' end return ret .. '${EXPLANATIONBLURB}' end, tooltip = '${TOOLTIPFRAGMENT} due to vandalism', } }, move = { dispute = { description = 'For pages protected against page moves due to' .. ' disputes over the page title', explanation = "This protection is '''not''' an endorsement of the" .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', image = 'Move-protection-shackle.svg' }, vandalism = { description = 'For pages protected against' .. ' [[Wikipedia:Vandalism#Page-move vandalism' .. ' |page-move vandalism]]' } }, autoreview = {}, upload = {} }, -------------------------------------------------------------------------------- -- -- GENERAL DATA TABLES -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Protection blurbs -------------------------------------------------------------------------------- -- This table produces the protection blurbs available with the -- ${PROTECTIONBLURB} parameter. It is sorted by protection action and -- protection level, and is checked by the module in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionBlurbs = { edit = { default = 'This ${PAGETYPE} is currently [[Help:Protection|' .. 'protected]] from editing', autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access' .. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered' .. ' users|unregistered]] users is currently [[Help:Protection|disabled]]', extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = 'All edits made to this ${PAGETYPE} by' .. ' [[Wikipedia:User access levels#New users|new]] or' .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]' .. ' users are currently' .. ' [[Wikipedia:Pending changes|subject to review]]' }, upload = { default = 'Uploading new versions of this ${PAGETYPE} is currently disabled' } }, -------------------------------------------------------------------------------- -- Explanation blurbs -------------------------------------------------------------------------------- -- This table produces the explanation blurbs available with the -- ${EXPLANATIONBLURB} parameter. It is sorted by protection action, -- protection level, and whether the page is a talk page or not. If the page is -- a talk page it will have a talk key of "talk"; otherwise it will have a talk -- key of "subject". The table is checked in the following order: -- 1. page's protection action, page's protection level, page's talk key -- 2. page's protection action, page's protection level, default talk key -- 3. page's protection action, default protection level, page's talk key -- 4. page's protection action, default protection level, default talk key -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. explanationBlurbs = { edit = { autoconfirmed = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details. If you' .. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].', }, extendedconfirmed = { default = 'Extended confirmed protection prevents edits from all unregistered editors' .. ' and registered users with fewer than 30 days tenure and 500 edits.' .. ' The [[Wikipedia:Protection policy#extended|policy on community use]]' .. ' specifies that extended confirmed protection can be applied to combat' .. ' disruption, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial changes supported by' .. ' [[Wikipedia:Consensus|consensus]].' }, default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]]. You may also [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|request]] that this page be unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' You may [[Wikipedia:Requests for page' .. ' protection#Current requests for edits to a protected page|request an' .. ' edit]] to this page, or [[Wikipedia:Requests for' .. ' page protection#Current requests for reduction in protection level' .. '|ask]] for it to be unprotected.' } }, move = { default = { subject = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves on the' .. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.', default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but cannot be moved' .. ' until unprotected. Please discuss any suggested moves at' .. ' [[Wikipedia:Requested moves]]. You can also' .. ' [[Wikipedia:Requests for page protection|request]] that the page be' .. ' unprotected.' } }, autoreview = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Edits to this ${PAGETYPE} by new and unregistered users' .. ' will not be visible to readers until they are accepted by' .. ' a reviewer. To avoid the need for your edits to be' .. ' reviewed, you may' .. ' [[Wikipedia:Requests for page protection' .. '#Current requests for reduction in protection level' .. '|request unprotection]], [[Special:Userlogin|log in]], or' .. ' [[Special:UserLogin/signup|create an account]].' }, }, upload = { default = { default = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' The page may still be edited but new versions of the file' .. ' cannot be uploaded until it is unprotected. You can' .. ' request that a new version be uploaded by using a' .. ' [[Wikipedia:Edit requests|protected edit request]], or you' .. ' can [[Wikipedia:Requests for page protection|request]]' .. ' that the file be unprotected.' } } }, -------------------------------------------------------------------------------- -- Protection levels -------------------------------------------------------------------------------- -- This table provides the data for the ${PROTECTIONLEVEL} parameter, which -- produces a short label for different protection levels. It is sorted by -- protection action and protection level, and is checked in the following -- order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. protectionLevels = { edit = { default = 'protected', templateeditor = 'template-protected', extendedconfirmed = 'extended-protected', autoconfirmed = 'semi-protected', }, move = { default = 'move-protected' }, autoreview = { }, upload = { default = 'upload-protected' } }, -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- This table lists different padlock images for each protection action and -- protection level. It is used if an image is not specified in any of the -- banner data tables, and if the page does not satisfy the conditions for using -- the ['image-filename-indef'] image. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level images = { edit = { default = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.svg' } }, -- Pages with a reason specified in this table will show the special "indef" -- padlock, defined in the 'image-filename-indef' message, if no expiry is set. indefImageReasons = { template = true }, -------------------------------------------------------------------------------- -- Image links -------------------------------------------------------------------------------- -- This table provides the data for the ${IMAGELINK} parameter, which gets -- the image link for small padlock icons based on the page's protection action -- and protection level. It is checked in the following order: -- 1. page's protection action, page's protection level -- 2. page's protection action, default protection level -- 3. "edit" protection action, default protection level -- -- It is possible to use banner parameters inside this table. -- *required* - this table needs edit, move, autoreview and upload subtables. imageLinks = { edit = { default = 'Wikipedia:Protection policy#full', templateeditor = 'Wikipedia:Protection policy#template', extendedconfirmed = 'Wikipedia:Protection policy#extended', autoconfirmed = 'Wikipedia:Protection policy#semi' }, move = { default = 'Wikipedia:Protection policy#move' }, autoreview = { default = 'Wikipedia:Protection policy#pending' }, upload = { default = 'Wikipedia:Protection policy#upload' } }, -------------------------------------------------------------------------------- -- Padlock indicator names -------------------------------------------------------------------------------- -- This table provides the "name" attribute for the <indicator> extension tag -- with which small padlock icons are generated. All indicator tags on a page -- are displayed in alphabetical order based on this attribute, and with -- indicator tags with duplicate names, the last tag on the page wins. -- The attribute is chosen based on the protection action; table keys must be a -- protection action name or the string "default". padlockIndicatorNames = { autoreview = 'pp-autoreview', default = 'pp-default' }, -------------------------------------------------------------------------------- -- Protection categories -------------------------------------------------------------------------------- --[[ -- The protection categories are stored in the protectionCategories table. -- Keys to this table are made up of the following strings: -- -- 1. the expiry date -- 2. the namespace -- 3. the protection reason (e.g. "dispute" or "vandalism") -- 4. the protection level (e.g. "sysop" or "autoconfirmed") -- 5. the action (e.g. "edit" or "move") -- -- When the module looks up a category in the table, first it will will check to -- see a key exists that corresponds to all five parameters. For example, a -- user page semi-protected from vandalism for two weeks would have the key -- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module -- changes the first part of the key to "all" and checks the table again. It -- keeps checking increasingly generic key combinations until it finds the -- field, or until it reaches the key "all-all-all-all-all". -- -- The module uses a binary matrix to determine the order in which to search. -- This is best demonstrated by a table. In this table, the "0" values -- represent "all", and the "1" values represent the original data (e.g. -- "indef" or "file" or "vandalism"). -- -- expiry namespace reason level action -- order -- 1 1 1 1 1 1 -- 2 0 1 1 1 1 -- 3 1 0 1 1 1 -- 4 0 0 1 1 1 -- 5 1 1 0 1 1 -- 6 0 1 0 1 1 -- 7 1 0 0 1 1 -- 8 0 0 0 1 1 -- 9 1 1 1 0 1 -- 10 0 1 1 0 1 -- 11 1 0 1 0 1 -- 12 0 0 1 0 1 -- 13 1 1 0 0 1 -- 14 0 1 0 0 1 -- 15 1 0 0 0 1 -- 16 0 0 0 0 1 -- 17 1 1 1 1 0 -- 18 0 1 1 1 0 -- 19 1 0 1 1 0 -- 20 0 0 1 1 0 -- 21 1 1 0 1 0 -- 22 0 1 0 1 0 -- 23 1 0 0 1 0 -- 24 0 0 0 1 0 -- 25 1 1 1 0 0 -- 26 0 1 1 0 0 -- 27 1 0 1 0 0 -- 28 0 0 1 0 0 -- 29 1 1 0 0 0 -- 30 0 1 0 0 0 -- 31 1 0 0 0 0 -- 32 0 0 0 0 0 -- -- In this scheme the action has the highest priority, as it is the last -- to change, and the expiry has the least priority, as it changes the most. -- The priorities of the expiry, the protection level and the action are -- fixed, but the priorities of the reason and the namespace can be swapped -- through the use of the cfg.bannerDataNamespaceHasPriority table. --]] -- If the reason specified to the template is listed in this table, -- namespace data will take priority over reason data in the protectionCategories -- table. reasonsWithNamespacePriority = { vandalism = true, }, -- The string to use as a namespace key for the protectionCategories table for each -- namespace number. categoryNamespaceKeys = { [ 2] = 'user', [ 3] = 'user', [ 4] = 'project', [ 6] = 'file', [ 8] = 'mediawiki', [ 10] = 'template', [ 12] = 'project', [ 14] = 'category', [100] = 'portal', [828] = 'module', }, protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', ['all|all|office|all|all'] = 'Wikipedia Office-protected pages', ['all|all|reset|all|all'] = 'Wikipedia Office-protected pages', ['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages', ['all|all|mainpage|all|all'] = 'Wikipedia fully protected main page files', ['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['all|template|all|all|edit'] = 'Wikipedia fully protected templates', ['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages', ['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages', ['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people', ['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people', ['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute', ['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users', ['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism', ['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories', ['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files', ['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals', ['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages', ['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages', ['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates', ['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-protected templates ['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people', ['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people', ['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute', ['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users', ['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism', ['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories', ['all|file|all|sysop|edit'] = 'Wikipedia fully protected files', ['all|project|all|sysop|edit'] = 'Wikipedia fully protected project pages', ['all|talk|all|sysop|edit'] = 'Wikipedia fully protected talk pages', ['all|template|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages', ['all|module|all|all|edit'] = 'Wikipedia fully protected modules', ['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules', ['all|module|all|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected modules', ['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules', ['all|all|all|sysop|move'] = 'Wikipedia move-protected pages', ['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages', ['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute', ['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism', ['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals', ['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages', ['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages', ['all|template|all|sysop|move'] = 'Wikipedia move-protected templates', ['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages', ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages', ['all|file|all|all|upload'] = 'Wikipedia upload-protected files', }, -------------------------------------------------------------------------------- -- Expiry category config -------------------------------------------------------------------------------- -- This table configures the expiry category behaviour for each protection -- action. -- * If set to true, setting that action will always categorise the page if -- an expiry parameter is not set. -- * If set to false, setting that action will never categorise the page. -- * If set to nil, the module will categorise the page if: -- 1) an expiry parameter is not set, and -- 2) a reason is provided, and -- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck -- table. expiryCheckActions = { edit = nil, move = false, autoreview = true, upload = false }, reasonsWithoutExpiryCheck = { blp = true, template = true, }, -------------------------------------------------------------------------------- -- Pagetypes -------------------------------------------------------------------------------- -- This table produces the page types available with the ${PAGETYPE} parameter. -- Keys are namespace numbers, or the string "default" for the default value. pagetypes = { [0] = 'article', [6] = 'file', [10] = 'template', [14] = 'category', [828] = 'module', default = 'page' }, -------------------------------------------------------------------------------- -- Strings marking indefinite protection -------------------------------------------------------------------------------- -- This table contains values passed to the expiry parameter that mean the page -- is protected indefinitely. indefStrings = { ['indef'] = true, ['indefinite'] = true, ['indefinitely'] = true, ['infinite'] = true, }, -------------------------------------------------------------------------------- -- Group hierarchy -------------------------------------------------------------------------------- -- This table maps each group to all groups that have a superset of the original -- group's page editing permissions. hierarchy = { sysop = {}, reviewer = {'sysop'}, filemover = {'sysop'}, templateeditor = {'sysop'}, extendedconfirmed = {'sysop'}, autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'}, user = {'autoconfirmed'}, ['*'] = {'user'} }, -------------------------------------------------------------------------------- -- Wrapper templates and their default arguments -------------------------------------------------------------------------------- -- This table contains wrapper templates used with the module, and their -- default arguments. Templates specified in this table should contain the -- following invocation, and no other template content: -- -- {{#invoke:Protection banner|main}} -- -- If other content is desired, it can be added between -- <noinclude>...</noinclude> tags. -- -- When a user calls one of these wrapper templates, they will use the -- default arguments automatically. However, users can override any of the -- arguments. wrappers = { ['Template:Pp'] = {}, ['Template:Pp-extended'] = {'ecp'}, ['Template:Pp-blp'] = {'blp'}, -- we don't need Template:Pp-create ['Template:Pp-dispute'] = {'dispute'}, ['Template:Pp-main-page'] = {'mainpage'}, ['Template:Pp-move'] = {action = 'move', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {action = 'autoreview', small = true}, ['Template:Pp-reset'] = {'reset'}, ['Template:Pp-semi-indef'] = {small = true}, ['Template:Pp-sock'] = {'sock'}, ['Template:Pp-template'] = {'template', small = true}, ['Template:Pp-upload'] = {action = 'upload'}, ['Template:Pp-usertalk'] = {'usertalk'}, ['Template:Pp-vandalism'] = {'vandalism'}, }, -------------------------------------------------------------------------------- -- -- MESSAGES -- -------------------------------------------------------------------------------- msg = { -------------------------------------------------------------------------------- -- Intro blurb and intro fragment -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${INTROBLURB} and -- ${INTROFRAGMENT} parameters. If the protection is temporary they use the -- intro-blurb-expiry or intro-fragment-expiry, and if not they use -- intro-blurb-noexpiry or intro-fragment-noexpiry. -- It is possible to use banner parameters in these messages. ['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.', ['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.', ['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},', ['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}', -------------------------------------------------------------------------------- -- Tooltip blurb -------------------------------------------------------------------------------- -- These messages specify what is produced by the ${TOOLTIPBLURB} parameter. -- If the protection is temporary the tooltip-blurb-expiry message is used, and -- if not the tooltip-blurb-noexpiry message is used. -- It is possible to use banner parameters in these messages. ['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.', ['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.', ['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},', ['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}', -------------------------------------------------------------------------------- -- Special explanation blurb -------------------------------------------------------------------------------- -- An explanation blurb for pages that cannot be unprotected, e.g. for pages -- in the MediaWiki namespace. -- It is possible to use banner parameters in this message. ['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|' .. 'protection policy]] and ${PROTECTIONLOG} for more details.' .. ' Please discuss any changes on the ${TALKPAGE}; you' .. ' may ${EDITREQUEST} to ask an' .. ' [[Wikipedia:Administrators|administrator]] to make an edit if it' .. ' is [[Help:Minor edit#When to mark an edit as a minor edit' .. '|uncontroversial]] or supported by [[Wikipedia:Consensus' .. '|consensus]].', -------------------------------------------------------------------------------- -- Protection log display values -------------------------------------------------------------------------------- -- These messages determine the display values for the protection log link -- or the pending changes log link produced by the ${PROTECTIONLOG} parameter. -- It is possible to use banner parameters in these messages. ['protection-log-display'] = 'protection log', ['pc-log-display'] = 'pending changes log', -------------------------------------------------------------------------------- -- Current version display values -------------------------------------------------------------------------------- -- These messages determine the display values for the page history link -- or the move log link produced by the ${CURRENTVERSION} parameter. -- It is possible to use banner parameters in these messages. ['current-version-move-display'] = 'current title', ['current-version-edit-display'] = 'current version', -------------------------------------------------------------------------------- -- Talk page -------------------------------------------------------------------------------- -- This message determines the display value of the talk page link produced -- with the ${TALKPAGE} parameter. -- It is possible to use banner parameters in this message. ['talk-page-link-display'] = 'talk page', -------------------------------------------------------------------------------- -- Edit requests -------------------------------------------------------------------------------- -- This message determines the display value of the edit request link produced -- with the ${EDITREQUEST} parameter. -- It is possible to use banner parameters in this message. ['edit-request-display'] = 'submit an edit request', -------------------------------------------------------------------------------- -- Expiry date format -------------------------------------------------------------------------------- -- This is the format for the blurb expiry date. It should be valid input for -- the first parameter of the #time parser function. ['expiry-date-format'] = 'F j, Y "at" H:i e', -------------------------------------------------------------------------------- -- Tracking categories -------------------------------------------------------------------------------- -- These messages determine which tracking categories the module outputs. ['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates', ['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules', -------------------------------------------------------------------------------- -- Images -------------------------------------------------------------------------------- -- These are images that are not defined by their protection action and protection level. ['image-filename-indef'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } a20552ae38cb5253a4fa29aa126abc74215a589f Module:Sidebar 828 888 1754 1753 2023-07-15T16:48:41Z Richard Robin 2 已从[[:wikipedia:Module:Sidebar]]导入1个版本 Scribunto text/plain require('strict') local cfg = mw.loadData('Module:Sidebar/configuration') local p = {} local getArgs = require('Module:Arguments').getArgs --[[ Categorizes calling templates and modules with a 'style' parameter of any sort for tracking to convert to TemplateStyles. TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module. TODO would probably want to remove /log and /archive as CS1 does ]] local function categorizeTemplatesWithInlineStyles(args) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 and title.namespace ~= 828 then return '' end for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do if title.text:match(pattern) then return '' end end for key, _ in pairs(args) do if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == 'width' then return cfg.i18n.category.conversion end end end --[[ For compatibility with the original {{sidebar with collapsible lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]] -- See ([[meta:Help:Newlines and spaces#Automatic newline]]) local function trimAndAddAutomaticNewline(s) s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then return '\n' .. s else return s end end --[[ Finds whether a sidebar has a subgroup sidebar. ]] local function hasSubgroup(s) if mw.ustring.find(s, cfg.i18n.pattern.subgroup) then return true else return false end end local function has_navbar(navbar_mode, sidebar_name) return navbar_mode ~= cfg.i18n.navbar_none and navbar_mode ~= cfg.i18n.navbar_off and ( sidebar_name or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, '') ~= cfg.i18n.title_not_to_add_navbar ) end local function has_list_class(args, htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, value in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, 'class') then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles(args) local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(args, htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local plainlist_styles = add_list_templatestyles('plainlist', cfg.i18n.plainlist_templatestyles) local hlist_styles = add_list_templatestyles('hlist', cfg.i18n.hlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar(args.navbar, args.name) and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.hlist_templatestyles} } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. [hlist_note] return hlist_styles .. plainlist_styles end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end --[[ Main sidebar function. Takes the frame, args, and an optional collapsibleClass. The collapsibleClass is and should be used only for sidebars with collapsible lists, as in p.collapsible. ]] function p.sidebar(frame, args, collapsibleClass) if not args then args = getArgs(frame) end local hiding_templatestyles = table.concat(move_hiding_templatestyles(args)) local root = mw.html.create() local child = args.child and mw.text.trim(args.child) == cfg.i18n.child_yes root = root:tag('table') if not child then root :addClass(cfg.i18n.class.sidebar) -- force collapsibleclass to be sidebar-collapse otherwise output nothing :addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil) :addClass('nomobile') :addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil) :addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil) :addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil) :addClass(args.bodyclass or args.class) :css('width', args.width or nil) :cssText(args.bodystyle or args.style) if args.outertitle then root :tag('caption') :addClass(cfg.i18n.class.outer_title) :addClass(args.outertitleclass) :cssText(args.outertitlestyle) :wikitext(args.outertitle) end if args.topimage then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.top_image) :addClass(args.topimageclass) :cssText(args.topimagestyle) :wikitext(args.topimage) if args.topcaption then imageCell :tag('div') :addClass(cfg.i18n.class.top_caption) :cssText(args.topcaptionstyle) :wikitext(args.topcaption) end end if args.pretitle then root :tag('tr') :tag('td') :addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image or cfg.i18n.class.pretitle) :addClass(args.pretitleclass) :cssText(args.basestyle) :cssText(args.pretitlestyle) :wikitext(args.pretitle) end else root :addClass(cfg.i18n.class.subgroup) :addClass(args.bodyclass or args.class) :cssText(args.bodystyle or args.style) end if args.title then if child then root :wikitext(args.title) else root :tag('tr') :tag('th') :addClass(args.pretitle and cfg.i18n.class.title_with_pretitle or cfg.i18n.class.title) :addClass(args.titleclass) :cssText(args.basestyle) :cssText(args.titlestyle) :wikitext(args.title) end end if args.image then local imageCell = root:tag('tr'):tag('td') imageCell :addClass(cfg.i18n.class.image) :addClass(args.imageclass) :cssText(args.imagestyle) :wikitext(args.image) if args.caption then imageCell :tag('div') :addClass(cfg.i18n.class.caption) :cssText(args.captionstyle) :wikitext(args.caption) end end if args.above then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.above) :addClass(args.aboveclass) :cssText(args.abovestyle) :newline() -- newline required for bullet-points to work :wikitext(args.above) end local rowNums = {} for k, v in pairs(args) do k = '' .. k local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$') if num then table.insert(rowNums, tonumber(num)) end end table.sort(rowNums) -- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 -- and content3 are specified) for i = #rowNums, 1, -1 do if rowNums[i] == rowNums[i - 1] then table.remove(rowNums, i) end end for i, num in ipairs(rowNums) do local heading = args['heading' .. num] if heading then root :tag('tr') :tag('th') :addClass(cfg.i18n.class.heading) :addClass(args.headingclass) :addClass(args['heading' .. num .. 'class']) :cssText(args.basestyle) :cssText(args.headingstyle) :cssText(args['heading' .. num .. 'style']) :newline() :wikitext(heading) end local content = args['content' .. num] if content then root :tag('tr') :tag('td') :addClass(hasSubgroup(content) and cfg.i18n.class.content_with_subgroup or cfg.i18n.class.content) :addClass(args.contentclass) :addClass(args['content' .. num .. 'class']) :cssText(args.contentstyle) :cssText(args['content' .. num .. 'style']) :newline() :wikitext(content) :done() -- Without a linebreak after the </td>, a nested list like -- "* {{hlist| ...}}" doesn't parse correctly. :newline() end end if args.below then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.below) :addClass(args.belowclass) :cssText(args.belowstyle) :newline() :wikitext(args.below) end if not child and has_navbar(args.navbar, args.name) then root :tag('tr') :tag('td') :addClass(cfg.i18n.class.navbar) :cssText(args.navbarstyle) :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, fontstyle = args.navbarfontstyle }) end local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.i18n.templatestyles } } local templatestyles = '' if args['templatestyles'] and args['templatestyles'] ~= '' then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] and args['child templatestyles'] ~= '' then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] and args['grandchild templatestyles'] ~= '' then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ add_list_styles(args), -- see [hlist_note] above about ordering base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles, hiding_templatestyles, tostring(root), (child and cfg.i18n.category.child or ''), categorizeTemplatesWithInlineStyles(args) }) end local function list_title(args, is_centered_list_titles, num) local title_text = trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or cfg.i18n.default_list_title) local title if is_centered_list_titles then -- collapsible can be finicky, so provide some CSS/HTML to support title = mw.html.create('div') :addClass(cfg.i18n.class.list_title_centered) :wikitext(title_text) else title = mw.html.create() :wikitext(title_text) end local title_container = mw.html.create('div') :addClass(cfg.i18n.class.list_title) -- don't /need/ a listnumtitleclass because you can do -- .templateclass .listnumclass .sidebar-list-title :addClass(args.listtitleclass) :cssText(args.basestyle) :cssText(args.listtitlestyle) :cssText(args['list' .. num .. 'titlestyle']) :node(title) :done() return title_container end --[[ Main entry point for sidebar with collapsible lists. Does the work of creating the collapsible lists themselves and including them into the args. ]] function p.collapsible(frame) local args = getArgs(frame) if not args.name and frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, '') == cfg.i18n.collapse_title_not_to_add_navbar then args.navbar = cfg.i18n.navbar_none end local contentArgs = {} local is_centered_list_titles = false if args['centered list titles'] and args['centered list titles'] ~= '' then is_centered_list_titles = true end for k, v in pairs(args) do local num = string.match(k, '^list(%d+)$') if num then local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name']) local row = mw.html.create('div') row :addClass(cfg.i18n.class.list) :addClass('mw-collapsible') :addClass((not expand) and 'mw-collapsed' or nil) :addClass(args['list' .. num .. 'class']) :cssText(args.listframestyle) :cssText(args['list' .. num .. 'framestyle']) :node(list_title(args, is_centered_list_titles, num)) :tag('div') :addClass(cfg.i18n.class.list_content) :addClass('mw-collapsible-content') -- don't /need/ a listnumstyleclass because you can do -- .templatename .listnumclass .sidebar-list :addClass(args.listclass) :cssText(args.liststyle) :cssText(args['list' .. num .. 'style']) :wikitext(trimAndAddAutomaticNewline(args['list' .. num])) contentArgs['content' .. num] = tostring(row) end end for k, v in pairs(contentArgs) do args[k] = v end return p.sidebar(frame, args, cfg.i18n.class.collapse) end return p 71fe765846593e025ca2f94371315e9dbb5bb4d2 Module:Sidebar/configuration 828 889 1756 1755 2023-07-15T16:48:41Z Richard Robin 2 已从[[:wikipedia:Module:Sidebar/configuration]]导入1个版本 Scribunto text/plain return { i18n = { child_yes = 'yes', float_none = 'none', float_left = 'left', wrap_true = 'true', navbar_none = 'none', navbar_off = 'off', default_list_title = 'List', title_not_to_add_navbar = 'Template:Sidebar', collapse_title_not_to_add_navbar = 'Template:Sidebar with collapsible lists', templatestyles = 'Module:Sidebar/styles.css', hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', category = { child = '[[Category:Pages using sidebar with the child parameter]]', conversion = '[[Category:Sidebars with styles needing conversion]]' }, pattern = { collapse_sandbox = '/sandbox$', sandbox = '/sandbox$', subgroup = 'sidebar%-subgroup', style_conversion = 'style$', uncategorized_conversion_titles = { '/[Ss]andbox', '/[Tt]estcases', '/[Dd]oc$' } }, class = { sidebar = 'sidebar', subgroup = 'sidebar-subgroup', collapse = 'sidebar-collapse', float_none = 'sidebar-none', float_left = 'sidebar-left', wraplinks = 'nowraplinks', outer_title = 'sidebar-outer-title', top_image = 'sidebar-top-image', top_caption = 'sidebar-top-caption', pretitle = 'sidebar-pretitle', pretitle_with_top_image = 'sidebar-pretitle-with-top-image', title = 'sidebar-title', title_with_pretitle = 'sidebar-title-with-pretitle', image = 'sidebar-image', caption = 'sidebar-caption', above = 'sidebar-above', heading = 'sidebar-heading', content = 'sidebar-content', content_with_subgroup = 'sidebar-content-with-subgroup', below = 'sidebar-below', navbar = 'sidebar-navbar', list = 'sidebar-list', list_title = 'sidebar-list-title', list_title_centered = 'sidebar-list-title-c', list_content = 'sidebar-list-content' } } } dc2a980ac2162a898f7c21e6d6ba7e994dfeb315 Module:Sidebar/styles.css 828 890 1758 1757 2023-07-15T16:48:42Z Richard Robin 2 已从[[:wikipedia:Module:Sidebar/styles.css]]导入1个版本 sanitized-css text/css /* {{pp-template}} */ /* TODO: Invert width design to be "mobile first" */ .sidebar { /* TODO: Ask if we should have max-width 22em instead */ width: 22em; /* @noflip */ float: right; /* @noflip */ clear: right; /* @noflip */ margin: 0.5em 0 1em 1em; background: #f8f9fa; border: 1px solid #aaa; padding: 0.2em; text-align: center; line-height: 1.4em; font-size: 88%; border-collapse: collapse; /* Timeless has display: none on .nomobile at mobile resolutions, so we * unhide it with display: table and let precedence and proximity win. */ display: table; } /* Unfortunately, so does Minerva desktop, except Minerva drops an * !important on the declaration. So we have to be mean for Minerva users. * Mobile removes the element entirely with `wgMFRemovableClasses` in * https://github.com/wikimedia/operations-mediawiki-config/blob/master/ wmf-config/InitialiseSettings.php#L16992 * which is why displaying it categorically with display: table works. * We don't really want to expose the generic user in the wild on mobile to have * to deal with sidebars. (Maybe the ones with collapsible lists, so that * might be an improvement. That is blocked on [[:phab:T111565]].) */ body.skin-minerva .sidebar { display: table !important; /* also, minerva is way too aggressive about other stylings on tables. * TODO remove when this template gets moved to a div. plans on talk page. * We always float right on Minerva because that's a lot of extra CSS * otherwise. */ float: right !important; margin: 0.5em 0 1em 1em !important; } .sidebar-subgroup { width: 100%; margin: 0; border-spacing: 0; } .sidebar-left { /* @noflip */ float: left; /* @noflip */ clear: left; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-none { float: none; clear: both; /* @noflip */ margin: 0.5em 1em 1em 0; } .sidebar-outer-title { padding: 0 0.4em 0.2em; font-size: 125%; line-height: 1.2em; font-weight: bold; } .sidebar-top-image { padding: 0.4em; } .sidebar-top-caption, .sidebar-pretitle-with-top-image, .sidebar-caption { padding: 0.2em 0.4em 0; line-height: 1.2em; } .sidebar-pretitle { padding: 0.4em 0.4em 0; line-height: 1.2em; } .sidebar-title, .sidebar-title-with-pretitle { padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; } .sidebar-title-with-pretitle { padding: 0.1em 0.4em; } .sidebar-image { padding: 0.2em 0.4em 0.4em; } .sidebar-heading { padding: 0.1em 0.4em; } .sidebar-content { padding: 0 0.5em 0.4em; } .sidebar-content-with-subgroup { padding: 0.1em 0.4em 0.2em; } .sidebar-above, .sidebar-below { padding: 0.3em 0.8em; font-weight: bold; } .sidebar-collapse .sidebar-above, .sidebar-collapse .sidebar-below { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; } .sidebar-navbar { text-align: right; font-size: 115%; padding: 0 0.4em 0.4em; } .sidebar-list-title { padding: 0 0.4em; text-align: left; font-weight: bold; line-height: 1.6em; font-size: 105%; } /* centered text with mw-collapsible headers is finicky */ .sidebar-list-title-c { padding: 0 0.4em; text-align: center; margin: 0 3.3em; } @media (max-width: 720px) { /* users have wide latitude to set arbitrary width and margin :( "Super-specific" selector to prevent overriding this appearance by lower level sidebars too */ body.mediawiki .sidebar { width: 100% !important; clear: both; float: none !important; /* Remove when we div based; Minerva is dumb */ margin-left: 0 !important; margin-right: 0 !important; } /* TODO: We might consider making all links wrap at small resolutions and then * only introduce nowrap at higher resolutions. Do when we invert the media * query. */ } 7d621b35a37807a103b59075851fe36201204ceb Template:As of 10 891 1760 1759 2023-07-15T16:48:42Z Richard Robin 2 已从[[:wikipedia:Template:As_of]]导入1个版本 wikitext text/x-wiki <!--{{As of}} begin--><includeonly><!-- ## param 1 is the year ## optional param 2 is the month ## optional param 3 is the day of the month ## optional named parameter alt=[text] is alternative display text (may include wiki markup) ## optional named parameter df=US produces American date format in displayed text ## optional named parameter lc=on gives lower-case-first output ## optional named parameter url=[URL] gives statement reference ## displayed text ([A/a]s of [Start date] by default) -->{{#if: {{{alt|}}} | {{{alt}}} | {{#if:{{{bare|}}}||{{#if:{{yesno|{{{since|}}}}}|{{#if: {{yesno|{{{lc|}}}}} | s | S }}ince | {{#if: {{yesno|{{{lc|}}}}} | a | A }}s of}}}} {{#if:{{{pre|}}}|{{{pre}}}&#32;}}{{#if: {{{3|}}} | {{#ifeq:{{lc:{{{df|}}}}}|us|{{MONTHNAME|{{{2}}}}}&nbsp;{{#expr:{{{3}}}}},&#32;|{{#expr:{{{3}}}}}&nbsp;{{MONTHNAME|{{{2}}}}}&nbsp;}}{{{1}}}|{{#if: {{{2|}}} |{{MONTHNAME|{{{2}}}}}&nbsp;}}{{{1}}}}}}}{{#if:{{{post|}}}|<nowiki />{{{post}}}}}<!-- #### That nowiki is required or, various characters (:, ;, #, and *} will be parsed as wikisyntax for list items. ## ref/update inline banner (hidden by default) --><sup class="plainlinks noexcerpt noprint asof-tag {{#if:{{{url|}}}|ref|update}}" style="display:none;">[{{#if:{{{url|}}}|{{{url}}} &#91;ref&#93;|{{fullurl:{{PAGENAME}}|action=edit}} &#91;update&#93;}}]</sup><!-- ## categorisation disabled outside main namespace -->{{DMCA|Articles containing potentially dated statements|from|<!-- ## temporal category for template (word method) -->{{#if: {{#ifexpr: {{{1}}} = 1 }} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 2004 | {{{1}}} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 1989 | {{#time:Y|{{{1}}}}} | before 1990 }}}} | <!-- ## temporal category for template (parameter method) -->{{#ifexpr: {{{1}}} > 2004 | {{#if:{{{2|}}} | {{MONTHNAME|{{{2}}}}} }} {{{1}}} | {{#ifexpr:{{{1}}} > 1989 | {{{1}}} | before 1990 }}}}}}|<!-- ## global category for template -->All articles containing potentially dated statements}}</includeonly><!--{{As of}} end--><noinclude><!-- ## dynamic example (as of today, self ref) -->{{As of|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}<sup class="plainlinks">[https://en.wikipedia.org/wiki/Template:As_of &#91;ref&#93;]</sup> {{documentation}} <!-- Add categories and inter-wikis to the /doc subpage, not here! --> </noinclude>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using as of template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:As of]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | alt | bare | df | lc | post | pre | since | url }} dd0794e75a86855d0ccc649adeaa8be5d3c3c704 Template:Yesno-no 10 892 1762 1761 2023-07-15T16:48:42Z Richard Robin 2 已从[[:wikipedia:Template:Yesno-no]]导入1个版本 wikitext text/x-wiki {{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude> {{Documentation|Template:Yesno/doc}} <!--Categories go in the doc page referenced above; interwikis go in Wikidata.--> </noinclude> 1ad7b7800da1b867ead8f6ff8cef76e6201b3b56 Template:For 10 893 1764 1763 2023-07-15T16:48:43Z Richard Robin 2 已从[[:wikipedia:Template:For]]导入1个版本 wikitext text/x-wiki <includeonly>{{#invoke:For|For}}</includeonly><noinclude> {{Documentation}} </noinclude> 3f70c0fa7cd736071e7c6e7dcd90ff3704df26bb Module:Color contrast 828 894 1766 1765 2023-07-15T16:48:43Z Richard Robin 2 已从[[:wikipedia:Module:Color_contrast]]导入1个版本 Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 1e399769117591366a63f62996c9a407077cc711 Module:Color contrast/colors 828 895 1768 1767 2023-07-15T16:48:43Z Richard Robin 2 已从[[:wikipedia:Module:Color_contrast/colors]]导入1个版本 Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } 6ae47fdb24de4eed5ec26d203faf5341a388987b Module:For 828 896 1770 1769 2023-07-15T16:48:44Z Richard Robin 2 已从[[:wikipedia:Module:For]]导入1个版本 Scribunto text/plain local mArguments --initialize lazily local mHatlist = require('Module:Hatnote list') local mHatnote = require('Module:Hatnote') local yesNo = require('Module:Yesno') local p = {} --Implements {{For}} from the frame --uses capitalized "For" to avoid collision with Lua reserved word "for" function p.For (frame) mArguments = require('Module:Arguments') return p._For(mArguments.getArgs(frame)) end --Implements {{For}} but takes a manual arguments table function p._For (args) local use = args[1] if (not use) then return mHatnote.makeWikitextError( 'no context parameter provided. Use {{other uses}} for "other uses" hatnotes.', 'Template:For#Errors', args.category ) end local pages = {} function two (a, b) return a, b, 1 end --lets us run ipairs from 2 for k, v in two(ipairs(args)) do table.insert(pages, v) end local title = mw.title.getCurrentTitle() local skipCat = title.isTalkPage or title.namespace == 2 --don't categorise talk pages and userspace local oddCat = skipCat and '' or '[[Category:Hatnote templates using unusual parameters]]' local category = yesNo(args.category) return mHatnote._hatnote( mHatlist.forSeeTableToString({{use = use, pages = pages}}), {selfref = args.selfref} ) .. ( (use == 'other uses') and ((category == true) or (category == nil)) and oddCat or '' ) end return p 2faf1bd8c657f3425af829cbde9733a936d8d4f4 Template:Para 10 850 1772 1662 2023-07-15T16:48:44Z Richard Robin 2 已从[[:wikipedia:Template:Para]]导入1个版本 wikitext text/x-wiki <code class="tpl-para" style="word-break:break-word;{{SAFESUBST:<noinclude />#if:{{{plain|}}}|border: none; background-color: inherit;}} {{SAFESUBST:<noinclude />#if:{{{style|}}}|{{{style}}}}}">&#124;{{SAFESUBST:<noinclude />#if:{{{1|}}}|{{{1}}}&#61;}}{{{2|}}}</code><noinclude> {{Documentation}} <!--Categories and interwikis go near the bottom of the /doc subpage.--> </noinclude> 7be5bee75307eae9342bbb9ff3a613e93e93d5a7 Template:Navbar 10 81 1774 120 2023-07-15T16:48:45Z Richard Robin 2 已从[[:wikipedia:Template:Navbar]]导入1个版本 wikitext text/x-wiki <includeonly><!-- -->{{#if:{{{nodiv|}}} |<!--then: -->&nbsp;<span class="noprint plainlinks hlist navbar nomobile" style="{{{style|}}}"> |<!--else: --><div class="noprint plainlinks hlist navbar nomobile" style="{{{style|}}}"><!-- -->}}<!-- -->{{#if:{{{brackets|}}}|&#91;}}{{#ifeq:{{{mini|}}}{{{miniv|}}}{{{plain|}}}{{{viewplain|}}}|<!--equals:-->1 |<!--then:(nothing)--> |<!--else: -->本模板:&nbsp;<!-- -->}}<!-- -->{{#if:{{{mini|}}} |<!--then: -->[[Template:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板">查</span>]]{{·}}[[Template talk:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="关于这个模板的讨论页面">论</span>]]{{·}}[{{fullurl:Template:{{{1}}}|action=edit}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="您可以编辑这个模板。请在储存变更之前先预览">编</span>]{{#if:{{{history|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=history}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看zh-hant:檢視}-这个模板的编辑历史">历</span>]|}}{{#if:{{{purge|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=purge}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="清除这个模板的缓存">清</span>]|}}<!-- -->}}<!-- -->{{#ifeq:{{{miniv|}}}{{{viewplain|}}} |<!--equals:-->1 |<!--then: -->[[Template:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板">v{{#if:{{{viewplain|}}}|iew}}</span>]]<!-- -->|<!--else:(nothing)--> |}}<!-- -->{{#ifeq:{{{mini|}}}{{{miniv|}}}{{{viewplain|}}} |<!--equals:-->1 |<!--then:(nothing)--> |<!--else: -->[[Template:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板>-{zh-hans:查看;zh-hant:檢視}-</span>]]{{·}}[[Template talk:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="关于这个模板的讨论页面">讨论</span>]]{{·}}[{{fullurl:Template:{{{1}}}|action=edit}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="您可以编辑这个模板,请在储存变更之前先预览。">编辑</span>]{{#if:{{{history|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=history}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板的编辑历史">历史</span>]|}}{{#if:{{{purge|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=purge}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="清除这个模板的缓存">清除缓存</span>]|}}<!-- -->}}<!-- -->{{#if:{{{brackets|}}}|]}}<!-- -->{{#if:{{{nodiv|}}} |<!--then: --></span>&nbsp; |<!--else: --></div><!-- -->}}</includeonly><noinclude> {{模板文件}} <!-- 請將模板的分類與跨語言連結增加在 [[Template:Navbar/doc]] 子頁面 --> </noinclude> db0399c9770ff5b726990512e51ac42a22253e81 Template:Hatnote 10 897 1776 1775 2023-07-15T16:48:45Z Richard Robin 2 已从[[:wikipedia:Template:Hatnote]]导入1个版本 wikitext text/x-wiki <includeonly>{{#invoke:Hatnote|hatnote}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 4a1d1028d07c9056022807a96051e1c82cf2a1c7 Template:Documentation 10 18 1778 1630 2023-07-15T16:48:45Z Richard Robin 2 已从[[:wikipedia:Template:Documentation]]导入1个版本 wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>[[Category:Templates]]</noinclude> 9885bb4fa99bf3d5b960e73606bbb8eed3026877 Module:Documentation 828 838 1780 1636 2023-07-15T16:48:46Z Richard Robin 2 已从[[:wikipedia:Module:Documentation]]导入1个版本 Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return mw.ustring.format('[[%s|%s]]', page, display) else return mw.ustring.format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return mw.ustring.format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return '<span class="' .. message('toolbar-class') .. '">(' .. table.concat(ret, ' &#124; ') .. ')</span>' end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.fullUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end local data = {} data.title = title data.docTitle = docTitle -- View, display, edit, and purge links if /doc exists. data.viewLinkDisplay = message('view-link-display') data.editLinkDisplay = message('edit-link-display') data.historyLinkDisplay = message('history-link-display') data.purgeLinkDisplay = message('purge-link-display') -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end data.preload = preload data.createLinkDisplay = message('create-link-display') return data end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local function escapeBrackets(s) -- Escapes square brackets with HTML entities. s = s:gsub('%[', '&#91;') -- Replace square brackets with HTML entities. s = s:gsub('%]', '&#93;') return s end local ret local docTitle = data.docTitle local title = data.title local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay) local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay) ret = '[%s] [%s] [%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink) else local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) ret = '[%s] [%s]' ret = escapeBrackets(ret) ret = mw.ustring.format(ret, createLink, purgeLink) end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end local ret if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editUrl = docTitle:fullUrl{action = 'edit'} local editDisplay = message('edit-link-display') local editLink = makeUrlLink(editUrl, editDisplay) local historyUrl = docTitle:fullUrl{action = 'history'} local historyDisplay = message('history-link-display') local historyLink = makeUrlLink(historyUrl, historyDisplay) ret = message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) ret = message('create-module-doc-blurb', {createLink}) .. '<br />' end return ret end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'} local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText local ret = '' if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then ret = ret .. makeCategoryLink(message('strange-usage-category')) end return ret end return p 78cc3a78f2b5dbb267fa16027c0800a22dbd3c42 Module:Documentation/config 828 839 1782 1638 2023-07-15T16:48:47Z Richard Robin 2 已从[[:wikipedia:Module:Documentation/config]]导入1个版本 Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[w:Wikipedia:Template documentation|documentation]] is [[mw:Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[mw:Extension:Scribunto/Lua reference manual|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg d70e8b1402a2bbe08a1fef4b75d743e661af0c95 Module:Documentation/styles.css 828 840 1784 1640 2023-07-15T16:48:47Z Richard Robin 2 已从[[:wikipedia:Module:Documentation/styles.css]]导入1个版本 sanitized-css text/css .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } /* [[Category:Template stylesheets]] */ 5fb984fe8632dc068db16853a824c9f3d5175dd9 Template:Oldid 10 898 1786 1785 2023-07-15T16:48:47Z Richard Robin 2 已从[[:wikipedia:Template:Oldid]]导入1个版本 wikitext text/x-wiki <span class="plainlinks">[{{fullurl:{{{page|{{{1|Main Page}}}}}}|oldid={{{oldid|{{{2|}}}}}}}} {{{label|{{{title|{{{3|{{#if:{{{oldid|{{{2|}}}}}}|Old revision|Current version}} of {{#if:{{{page|{{{1|}}}}}}|'''{{{page|{{{1}}}}}}'''|a page}}}}}}}}}}}]</span><noinclude> {{documentation}} </noinclude> 4a42ae0cc77ec0385d4b6508c5d3f366db39ecdb Template:Endplainlist 10 899 1788 1787 2023-07-15T16:48:48Z Richard Robin 2 已从[[:wikipedia:Template:Endplainlist]]导入1个版本 wikitext text/x-wiki <includeonly></div></includeonly><noinclude> {{documentation|Template:Plainlist/doc}} </noinclude> d545c41582328dd4f197e2b1848c8ad7392b92e0 Template:Tag 10 900 1790 1789 2023-07-15T16:48:48Z Richard Robin 2 已从[[:wikipedia:Template:Tag]]导入1个版本 wikitext text/x-wiki <code class="{{#ifeq:{{{wrap|}}}|yes|wrap|nowrap}}" style="{{#ifeq:{{{style|}}}|plain|border:none;background:transparent;|{{{style|}}}}}"><!-- Opening tag -->{{#switch:{{{2|pair}}} |c|close = |e|empty|s|single|v|void |o|open |p|pair = &lt;{{#if:{{{link|}}}|[[HTML element#{{{1|tag}}}|{{{1|tag}}}]]|{{{1|tag}}}}}{{#if:{{{params|{{{attribs|}}}}}}|&#32;{{{params|{{{attribs}}}}}}}} }}<!-- Content between tags -->{{#switch:{{{2|pair}}} |c|close = {{{content|}}} |e|empty|s|single|v|void = &#32;&#47;&gt; |o|open = &gt;{{{content|}}} |p|pair = {{#ifeq:{{{1|tag}}}|!--||&gt;}}{{{content|...}}} }}<!-- Closing tag -->{{#switch:{{{2|pair}}} |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:{{{1|tag}}}|!--|--&gt;|&lt;&#47;{{{1|tag}}}&gt;}} }}<!-- --></code><noinclude> {{Documentation}} </noinclude> eae208bc1612c834de697fa3ee9b343966cf8602 Template:Sandbox other 10 901 1792 1791 2023-07-15T16:48:48Z Richard Robin 2 已从[[:wikipedia:Template:Sandbox_other]]导入1个版本 wikitext text/x-wiki {{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> 91e4ae891d6b791615152c1fbc971414961ba872 Template:Documentation subpage 10 836 1794 1632 2023-07-15T16:48:49Z Richard Robin 2 已从[[:wikipedia:Template:Documentation_subpage]]导入1个版本 wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=|link=]] | text = '''This is a documentation subpage''' for '''{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.<br/> It contains usage information, [[mw:Help:Categories|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} | page}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- -->{{#if:{{{inhibit|}}} |<!--(don't categorize)--> | <includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> 471e685c1c643a5c6272e20e49824fffebad0448 Template:Template link with link off 10 902 1796 1795 2023-07-15T16:48:49Z Richard Robin 2 已从[[:wikipedia:Template:Template_link_with_link_off]]导入1个版本 wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nowrap=yes|nolink=yes}}</includeonly><noinclude> {{Documentation|1=Template:Tlg/doc |content = {{tlg/doc|tlf}} }} <!-- Add categories to the /doc subpage, not here! --> </noinclude> b099fea5d1f36b0b4b9cb253ad3a9f4e095f6851 Template:Tlf 10 903 1798 1797 2023-07-15T16:48:49Z Richard Robin 2 已从[[:wikipedia:Template:Tlf]]导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:Template link with link off]] {{Redirect category shell| {{R from move}} }} 52759e1d3f7c9aa4a03d0b7d4f84f4c6adf53edf Template:Selfref 10 904 1800 1799 2023-07-15T16:48:50Z Richard Robin 2 已从[[:wikipedia:Template:Selfref]]导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:Self-reference]] {{Redirect category shell| {{R from template shortcut}} {{R from alternative spelling}} {{R from move}} }} 030c372ed4f83fa2e03a4c0ccdd4ad3cef8ec9e6 Template:FULLBASEPAGENAME 10 905 1802 1801 2023-07-15T16:48:50Z Richard Robin 2 已从[[:wikipedia:Template:FULLBASEPAGENAME]]导入1个版本 wikitext text/x-wiki {{#if: {{Ns has subpages | {{#if:{{{1|}}}|{{NAMESPACE:{{{1}}}}}|{{NAMESPACE}}}} }} | {{#if: {{#titleparts:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}|-1}} | {{#titleparts:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}|-1}} | {{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}} }} | {{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}} }}<noinclude> {{documentation}} </noinclude> a21f32ffc20eab6d41631b3fb8af4c63e153a6c3 Template:High-use 10 906 1804 1803 2023-07-15T16:48:51Z Richard Robin 2 已从[[:wikipedia:Template:High-use]]导入1个版本 wikitext text/x-wiki {{#invoke:High-use|main|1={{{1|}}}|2={{{2|}}}|info={{{info|}}}|demo={{{demo|}}}|form={{{form|}}}|expiry={{{expiry|}}}|system={{{system|}}}}}<noinclude> {{Documentation}} <!-- Add categories to the /doc subpage; interwiki links go to Wikidata, thank you! --> </noinclude> a3322d1bd47ac03df14fa2090855cff4fede9bc7 Template:TemplateData header 10 907 1806 1805 2023-07-15T16:48:51Z Richard Robin 2 已从[[:wikipedia:Template:TemplateData_header]]导入1个版本 wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- noheader: -->{{Template parameter usage|based=y}}|<!-- +header: -->This is the {{#if:{{{nolink|}}}|<!-- +header, nolink TD -->TemplateData|<!-- +header, +link [[TD]]; DEFAULT: -->[[Wikipedia:TemplateData|TemplateData]]}}<!-- e.o. #if:nolink; DEFAULT: --> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|based=y}}<!-- e.o. #if:noheader -->}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div><includeonly><!-- check parameters -->{{#invoke:Check for unknown parameters|check |unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}} |template=Template:TemplateData header |1 |nolink |noheader |preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Template:TemplateData header]].</div> }}<!-- -->{{template other|{{sandbox other|| [[Category:Templates using TemplateData]] }}}}</includeonly><!-- --><noinclude>{{Documentation}}</noinclude> ddfbb4ae793846b96d4c06330417fa6ed4da2adc Template:Template parameter usage 10 908 1808 1807 2023-07-15T16:48:51Z Richard Robin 2 已从[[:wikipedia:Template:Template_parameter_usage]]导入1个版本 wikitext text/x-wiki {{#switch:{{{label|}}} |=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|C|c}}lick here] to see a monthly parameter usage report for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|this template}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} |for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{#ifeq:{{yesno-no|{{{lc}}}}}|no|P|p}}arameter usage report] for {{#if:{{{1|}}}|[[Template:{{ROOTPAGENAME:{{{1|}}}}}]]|[[Template:{{ROOTPAGENAME}}]]}}{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}}. |#default=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{#if:{{{1|}}}|{{ROOTPAGENAME:{{{1|}}}}}|{{ROOTPAGENAME}}}}}} {{{label|}}}]{{#ifeq:{{yesno-no|{{{based}}}}}|yes|&#32;based on {{#if:{{{1|}}}|its|this}} TemplateData}} }}<noinclude> {{documentation}} </noinclude> b9cdd1b2e409313904f041c38562a3d6221cc017 Module:High-use 828 909 1810 1809 2023-07-15T16:48:52Z Richard Robin 2 已从[[:wikipedia:Module:High-use]]导入1个版本 Scribunto text/plain local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk" then return_value = "a very large number of" else return_value = "many" end else -- Use 2 significant figures for smaller numbers and 3 for larger ones local sigfig = 2 if count >= 100000 then sigfig = 3 end -- Prepare to round to appropriate number of sigfigs local f = math.floor(math.log10(count)) - sigfig + 1 -- Round and insert "approximately" or "+" when appropriate if (frame.args[2] == "yes") or (mw.ustring.sub(frame.args[1],-1) == "+") then -- Round down return_value = string.format("%s+", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) ) * (10^(f))) ) else -- Round to nearest return_value = string.format("approximately&#x20;%s", mw.getContentLanguage():formatNum(math.floor( (count / 10^(f)) + 0.5) * (10^(f))) ) end -- Insert percentage of pages if that is likely to be >= 1% and when |no-percent= not set to yes if count and count > 250000 and not yesno (frame:getParent().args['no-percent']) then local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) if percent >= 1 then return_value = string.format("%s&#x20;pages, or roughly %s%% of all", return_value, percent) end end end return return_value end -- Actions if there is a large (greater than or equal to 100,000) transclusion count function p.risk(frame) local return_value = "" if frame.args[1] == "risk" then return_value = "risk" else local count = _fetch(frame) if count and count >= 100000 then return_value = "risk" end end return return_value end function p.text(frame, count) -- Only show the information about how this template gets updated if someone -- is actually editing the page and maybe trying to update the count. local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or '' if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end local title = mw.title.getCurrentTitle() if title.subpageText == "doc" or title.subpageText == "sandbox" then title = title.basePageTitle end local systemMessages = frame.args['system'] if frame.args['system'] == '' then systemMessages = nil end -- This retrieves the project URL automatically to simplify localiation. local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format( mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'), mw.uri.encode(title.fullText), p.num(frame, count)) local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used '; if systemMessages then used_on_text = used_on_text .. systemMessages .. ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) else used_on_text = used_on_text .. templateCount .. "'''" end local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] or [[%s/testcases|/testcases]] subpages, or in your own [[%s]]. "):format( (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), title.fullText, title.fullText, mw.title.getCurrentTitle().namespace == 828 and "Module:Sandbox|module sandbox" or "Wikipedia:User pages#SUB|user subpage" ) local infoArg = frame.args["info"] ~= "" and frame.args["info"] if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.' if infoArg then info = info .. "<br />" .. infoArg end sandbox_text = info .. '<br /> To avoid major disruption' .. (count and count >= 100000 and ' and server load' or '') .. ', any changes should be tested in the ' .. sandbox_text .. 'The tested changes can be added to this page in a single edit. ' else sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') .. 'hanges may be widely noticed. Test changes in the ' .. sandbox_text end local discussion_text = systemMessages and 'Please discuss changes ' or 'Consider discussing changes ' if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) else discussion_text = string.format("%son the [[%s|talk page]]", discussion_text, title.talkPageTitle.fullText ) end return used_on_text .. sandbox_text .. discussion_text .. " before implementing them." .. bot_text end function p.main(frame) local count = nil if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end local image = "[[File:Ambox warning yellow.svg|40px|alt=Warning|link=]]" local type_param = "style" local epilogue = '' if frame.args['system'] and frame.args['system'] ~= '' then image = "[[File:Ambox important.svg|40px|alt=Warning|link=]]" type_param = "content" local nocat = frame:getParent().args['nocat'] or frame.args['nocat'] local categorise = (nocat == '' or not yesno(nocat)) if categorise then epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}') end elseif (frame.args[1] == "risk" or (count and count >= 100000)) then image = "[[File:Ambox warning orange.svg|40px|alt=Warning|link=]]" type_param = "content" end if frame.args["form"] == "editnotice" then return frame:expandTemplate{ title = 'editnotice', args = { ["image"] = image, ["text"] = p.text(frame, count), ["expiry"] = (frame.args["expiry"] or "") } } .. epilogue else return require('Module:Message box').main('ombox', { type = type_param, image = image, text = p.text(frame, count), expiry = (frame.args["expiry"] or "") }) .. epilogue end end return p 134551888e066954a89c109d2faa8af71a4454a4 Module:Transclusion count 828 910 1812 1811 2023-07-15T16:48:52Z Richard Robin 2 已从[[:wikipedia:Module:Transclusion_count]]导入1个版本 Scribunto text/plain local p = {} function p.fetch(frame) local template = nil local return_value = nil -- Use demo parameter if it exists, otherswise use current template name local namespace = mw.title.getCurrentTitle().namespace if frame.args["demo"] and frame.args["demo"] ~= "" then template = mw.ustring.gsub(frame.args["demo"],"^[Tt]emplate:","") elseif namespace == 10 then -- Template namespace template = mw.title.getCurrentTitle().text elseif namespace == 828 then -- Module namespace template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text) end -- If in template or module namespace, look up count in /data if template ~= nil then namespace = mw.title.new(template, "Template").namespace if namespace == 10 or namespace == 828 then template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end template = mw.ustring.gsub(template, "/sandbox$", "") -- strip /sandbox from end local index = mw.ustring.sub(mw.title.new(template).text,1,1) local status, data = pcall(function () return(mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))) end) if status then return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")]) end end end -- If database value doesn't exist, use value passed to template if return_value == nil and frame.args[1] ~= nil then local arg1=mw.ustring.match(frame.args[1], '[%d,]+') if arg1 and arg1 ~= '' then return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R')) end end return return_value end -- Tabulate this data for [[Wikipedia:Database reports/Templates transcluded on the most pages]] function p.tabulate(frame) local list = {} for i = 65, 91 do local data = mw.loadData('Module:Transclusion count/data/' .. ((i == 91) and 'other' or string.char(i))) for name, count in pairs(data) do table.insert(list, {mw.title.new(name, "Template").fullText, count}) end end table.sort(list, function(a, b) return (a[2] == b[2]) and (a[1] < b[1]) or (a[2] > b[2]) end) local lang = mw.getContentLanguage(); for i = 1, #list do list[i] = ('|-\n| %d || [[%s]] || %s\n'):format(i, list[i][1]:gsub('_', ' '), lang:formatNum(list[i][2])) end return table.concat(list) end return p 000ef6bcbf7b66e727870b0c300c4009da300513 Module:Lua banner 828 911 1814 1813 2023-07-15T16:48:53Z Richard Robin 2 已从[[:wikipedia:Module:Lua_banner]]导入1个版本 Scribunto text/plain -- This module implements the {{lua}} template. local yesno = require('Module:Yesno') local mList = require('Module:List') local mTableTools = require('Module:TableTools') local mMessageBox = require('Module:Message box') local p = {} function p.main(frame) local origArgs = frame:getParent().args local args = {} for k, v in pairs(origArgs) do v = v:match('^%s*(.-)%s*$') if v ~= '' then args[k] = v end end return p._main(args) end function p._main(args) local modules = mTableTools.compressSparseArray(args) local box = p.renderBox(modules) local trackingCategories = p.renderTrackingCategories(args, modules) return box .. trackingCategories end function p.renderBox(modules) local boxArgs = {} if #modules < 1 then boxArgs.text = '<strong class="error">Error: no modules specified</strong>' else local moduleLinks = {} for i, module in ipairs(modules) do moduleLinks[i] = string.format('[[:%s]]', module) local maybeSandbox = mw.title.new(module .. '/sandbox') if maybeSandbox.exists then moduleLinks[i] = moduleLinks[i] .. string.format(' ([[:%s|sandbox]])', maybeSandbox.fullText) end end local moduleList = mList.makeList('bulleted', moduleLinks) local title = mw.title.getCurrentTitle() if title.subpageText == "doc" then title = title.basePageTitle end if title.contentModel == "Scribunto" then boxArgs.text = 'This module depends on the following other modules:' .. moduleList else boxArgs.text = 'This template uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList end end boxArgs.type = 'notice' boxArgs.small = true boxArgs.image = '[[File:Lua-Logo.svg|30px|alt=|link=]]' return mMessageBox.main('mbox', boxArgs) end function p.renderTrackingCategories(args, modules, titleObj) if yesno(args.nocat) then return '' end local cats = {} -- Error category if #modules < 1 then cats[#cats + 1] = 'Lua templates with errors' end -- Lua templates category titleObj = titleObj or mw.title.getCurrentTitle() local subpageBlacklist = { doc = true, sandbox = true, sandbox2 = true, testcases = true } if not subpageBlacklist[titleObj.subpageText] then local protCatName if titleObj.namespace == 10 then local category = args.category if not category then local categories = { ['Module:String'] = 'Templates based on the String Lua module', ['Module:Math'] = 'Templates based on the Math Lua module', ['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module', ['Module:Citation/CS1'] = 'Templates based on the Citation/CS1 Lua module' } category = modules[1] and categories[modules[1]] category = category or 'Lua-based templates' end cats[#cats + 1] = category protCatName = "Templates using under-protected Lua modules" elseif titleObj.namespace == 828 then protCatName = "Modules depending on under-protected modules" end if not args.noprotcat and protCatName then local protLevels = { autoconfirmed = 1, extendedconfirmed = 2, templateeditor = 3, sysop = 4 } local currentProt if titleObj.id ~= 0 then -- id is 0 (page does not exist) if am previewing before creating a template. currentProt = titleObj.protectionLevels["edit"][1] end if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end for i, module in ipairs(modules) do if module ~= "WP:libraryUtil" then local moduleProt = mw.title.new(module).protectionLevels["edit"][1] if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end if moduleProt < currentProt then cats[#cats + 1] = protCatName break end end end end end for i, cat in ipairs(cats) do cats[i] = string.format('[[Category:%s]]', cat) end return table.concat(cats) end return p 03ec1b34a40121efc562c0c64a67ebbf57d56dff Template:Lua 10 912 1816 1815 2023-07-15T16:48:53Z Richard Robin 2 已从[[:wikipedia:Template:Lua]]导入1个版本 wikitext text/x-wiki <includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude> {{Lua|Module:Lua banner}} {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> dba3962144dacd289dbc34f50fbe0a7bf6d7f2f7 Template:Clc 10 913 1818 1817 2023-07-15T16:48:54Z Richard Robin 2 已从[[:wikipedia:Template:Clc]]导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:Category link with count]] 02280e2ab57b544236e11f913e3759c5781ca9d5 Template:Category link with count 10 914 1820 1819 2023-07-15T16:48:54Z Richard Robin 2 已从[[:wikipedia:Template:Category_link_with_count]]导入1个版本 wikitext text/x-wiki [[:Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|<!-- -->{{#if:{{{name|}}}|{{{name}}}|Category:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}}}<!-- -->]]&nbsp;({{PAGESINCATEGORY:{{#invoke:string|replace|1={{{1}}}|2=^:?[Cc]ategory:|3=|plain=false}}|{{{2|all}}}}})<noinclude> {{Documentation}} </noinclude> f93f1540b8c157703bd6d24ae35c35bef745981d Template:Self-reference 10 915 1822 1821 2023-07-15T16:48:55Z Richard Robin 2 已从[[:wikipedia:Template:Self-reference]]导入1个版本 wikitext text/x-wiki {{#switch:{{{2|NONE}}} |NONE|hatnote|hat={{Hatnote|extraclasses=plainlinks selfreference noprint|1={{{1}}}}} |inline=<div class="plainlinks selfreference" style="display:inline; font-style: italic;"><!--Same style as class hatnote.-->{{{1}}}</div> |<!--Matching the empty string here for unprintworthy content is for backwards compatibility with the 2006-2008 version. Do not depend on it!-->=<div style="display:inline;" class="plainlinks selfreference noprint">{{{1}}}</div> |#default={{error|Second parameter must be <code>hatnote</code>, <code>hat</code>, or <code>inline</code>}} }}<noinclude> {{Documentation}} <!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES THE /doc SUBPAGE, AND INTERWIKIS TO WIKIDATA, THANKS --> </noinclude> 0c4a08f880070e918c3edcaa50cc493f99841e98 Template:TemplateDataHeader 10 916 1824 1823 2023-07-15T16:48:55Z Richard Robin 2 已从[[:wikipedia:Template:TemplateDataHeader]]导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:TemplateData header]] {{R from move}} 61e461016bcb3a0a6fc4d8aea35d590298c19630 Template:Template display 10 917 1826 1825 2023-07-15T16:48:55Z Richard Robin 2 已从[[:wikipedia:Template:Template_display]]导入1个版本 wikitext text/x-wiki <includeonly>{{#invoke:Message box|ombox|type=notice |image={{#switch:{{{1}}}|adaptive=[[File:Different devices simple.svg|65x65px|link=|alt=]]|nomobile=[[File:Handheld devices no.svg|55px|link=|alt=]]|nodesktop=[[File:Desktop devices no.svg|55px|link=|alt=]]}} |text={{#switch:{{{1}}} | adaptive = This template is [[Adaptive web design|responsive]] and <strong>displays differently in mobile and desktop view</strong>. Read the documentation for an explanation of the differences and why they exist. | nomobile = This template does ''not'' display in the mobile view of Wikipedia; it is <strong>desktop only</strong>. Read the documentation for an explanation. | nodesktop = This template does ''not'' display in the desktop view of Wikipedia; it is <strong>mobile only</strong>. Read the documentation for an explanation. | nomobilesidebar = This template does ''not'' display in the mobile view of Wikipedia; it is <strong>desktop only</strong>. Read the [[Template:Sidebar/doc|parent documentation]] for an explanation. | vector2022 = This template does not work properly in the [[Wikipedia:Vector 2022|Vector 2022]] skin. Read the documentation for an explanation. | #default = {{{1}}} }}}}</includeonly><noinclude> {{Documentation}} </noinclude> 47cc41eacc2d2dec246f01b81111b280cec901a3 Template:Navbox suite 10 918 1828 1827 2023-07-15T16:48:56Z Richard Robin 2 已从[[:wikipedia:Template:Navbox_suite]]导入1个版本 wikitext text/x-wiki {{#invoke:sidebar|sidebar | width = auto | bodystyle = border-spacing:0;background:#f7f7f7;padding:2px; | title = Navbox suite | titlestyle = padding: 0.2em 0.8em; font-size: 145%; line-height: 1.2em; background-color: #ccf; | contentclass = plainlist | contentstyle = padding:0.25em;background:#fdfdfd; | content1 = *{{tl|Navbox}} *{{tl|Navbox with collapsible groups}} *{{tl|Navbox with columns}} *{{tl|Navboxes}} | navbarstyle = background:#fdfdfd;padding:0 5px }}<!-- NOTE: A template MUST support all of the parameters marked with a cross in Template:Navbox/doc in order to be Navbox suite compliant. In particular, the name, state, border, and navbar parameters are especially important. --><noinclude> {{Documentation|content= Helper template for linking between main navbox templates in their documentation. [[Category:Wikipedia-internal sidebar templates]] [[Category:Navbox meta-templates|Δ]]<!-- Δ for documentation ([[WP:SORTKEY]]) --> [[Category:Documentation see also templates]] }} </noinclude> 1c4315eaad3857aa3fcc7a7bb9d24c989e20e19f Template:Lua sidebar 10 919 1830 1829 2023-07-15T16:48:57Z Richard Robin 2 已从[[:wikipedia:Template:Lua_sidebar]]导入1个版本 wikitext text/x-wiki {{Sidebar | class = lua-sidebar | templatestyles = Template:Lua sidebar/styles.css | title = Related pages | content1 = {{plainlist}} * [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}|Template]] {{#if:{{#invoke:redirect|isRedirect|Template talk:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}}}||([[Template talk:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}|talk]])}} * [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/sandbox|Template sandbox]] * [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/testcases|Template testcases]] * [[Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/doc|Template doc]] * [[Special:PrefixIndex/Template:{{{template|{{{title|{{BASEPAGENAME}}}}}}}}/|Template subpages]] * [[Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}|Module]] {{#if:{{#invoke:redirect|isRedirect|Module talk:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}}}||([[Module talk:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}|talk]])}} * [[Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/sandbox|Module sandbox]] * [[Module talk:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/testcases|Module testcases]] * [[Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/doc|Module doc]] * [[Special:PrefixIndex/Module:{{{module|{{{title|{{BASEPAGENAME}}}}}}}}/|Module subpages]] {{endplainlist}} | content2 = {{{1|}}} }}<noinclude> {{Documentation}} </noinclude> f11e49d67a400d29f6d73720fea7eb5a273ab663 Template:Lua sidebar/styles.css 10 920 1832 1831 2023-07-15T16:48:57Z Richard Robin 2 已从[[:wikipedia:Template:Lua_sidebar/styles.css]]导入1个版本 sanitized-css text/css .lua-sidebar { width: auto; max-width: 22em; } 9984d36eb49fae70dd00527c993784d775409a6b Template:Navbox visibility 10 921 1834 1833 2023-07-15T16:48:57Z Richard Robin 2 已从[[:wikipedia:Template:Navbox_visibility]]导入1个版本 wikitext text/x-wiki Templates using the classes <code>class=navbox</code> ({{tl|navbox}}) or <code>class=nomobile</code> ({{tl|sidebar}}) are not displayed on the [https://en.m.wikipedia.org/ mobile web site] of English Wikipedia. Mobile page views account for approximately 65% of all page views (90-day average {{as of|May 2023|lc=y}}).<noinclude> {{documentation}} </noinclude> 3b1f65df829fd9f96b9c4f002fba38a0fd987a6b Template:PAGENAMETDOC 10 922 1836 1835 2023-07-15T16:48:58Z Richard Robin 2 已从[[:wikipedia:Template:PAGENAMETDOC]]导入1个版本 wikitext text/x-wiki {{#ifeq:{{#invoke:String|find|{{FULLPAGENAME}}|/sandbox%d*$|plain=false}}|0|{{{{#if:{{{1|}}}||FULL}}BASEPAGENAME}}|{{{{#if:{{{1|}}}||FULL}}PAGENAME}}}}<noinclude> {{Documentation|content= This template returns the current {{Tlx|FULLBASEPAGENAME}}, unless the title ends in <code>/sandbox</code> plus any number of digits, in which case it returns the {{tlx|FULLPAGENAME}}. It is primarily meant for demonstrating the sandbox version of templates in their documentation. This template takes one numbered parameter (<code>1</code>); if anything is in this parameter then it will return <code>&#123;&#123;BASEPAGENAME&#125;&#125;</code> and <code>&#123;&#123;PAGENAME&#125;&#125;</code>, which have no namespace prefix. }} [[Category:Wikipedia magic word templates]] </noinclude> ae0c3ac1a7415671c46f970d5faad2fd708640b0 Template:Navigation templates 10 923 1838 1837 2023-07-15T16:48:58Z Richard Robin 2 已从[[:wikipedia:Template:Navigation_templates]]导入1个版本 wikitext text/x-wiki {| class="wikitable" style="margin-left: auto; margin-right: auto; text-align: center;" |+ Navigation templates comparison {{Navbar|Navigation templates|plain=1|brackets=y}} |- ! Template ! Collapsible !! Header color ! Image !! Groups !! Style (body) <br /> parameter/s |- | style="text-align: left;" | {{tl|Navbox}} | collapsible || style="background: #ccf;" | navbox | Left/right of body || Yes || Yes |- | style="text-align: left;" | {{tl|Navbox with collapsible groups}} | collapsible || style="background: #ccf;" | navbox | Left/right of body and/or in each list || Yes || Yes |- | style="text-align: left;" | {{tl|Navbox with columns}} | collapsible || style="background: #ccf;" | navbox | Left/right of columns || No || Yes |} {| class="wikitable" style="margin-left: auto; margin-right: auto; text-align: center;" |+ Collapsible attributes |- ! Type !! CSS classes !! JavaScript !! Collapses when !! Custom <br /> initial&nbsp;state !! Nesting |- | style="text-align:left;" | [[Help:Collapsing|Collapsible tables]] | mw-collapsible | Defined in [[MediaWiki:Common.js|Common.js]] | 2 or more autocollapse on page || Yes || Yes |}<noinclude> [[Category:Navbox meta-templates|Δ]] [[Category:Documentation shared content templates]] </noinclude> d3db3f22f1995a65f056c5ca452cc441097416ce Module:Transclusion count/data/N 828 924 1840 1839 2023-07-15T16:48:58Z Richard Robin 2 已从[[:wikipedia:Module:Transclusion_count/data/N]]导入1个版本 Scribunto text/plain return { ["N"] = 16000, ["N.b."] = 2200, ["N/A"] = 24000, ["N/a"] = 54000, ["NA-Class"] = 14000, ["NASTRO_comment"] = 30000, ["NBA_Draft_template_list"] = 3400, ["NBA_Year"] = 5600, ["NBA_color"] = 3600, ["NBA_color_cell"] = 4300, ["NBA_color_cell2"] = 3400, ["NBA_player_statistics_legend"] = 4300, ["NBA_player_statistics_start"] = 3800, ["NBbox"] = 3400, ["NCAA_color_cell"] = 9700, ["NCAA_secondary_color_cell"] = 4200, ["NCES_District_ID"] = 2600, ["NED"] = 9600, ["NEXTYEAR"] = 7900, ["NFLAltPrimaryStyle"] = 5800, ["NFLPrimaryColor"] = 2200, ["NFLPrimaryStyle"] = 28000, ["NFLSecondaryColor"] = 19000, ["NFL_Roster_navbox_template_list"] = 2600, ["NFL_Year"] = 23000, ["NFL_predraft"] = 5900, ["NFL_predraft/check"] = 5900, ["NFL_predraft/ftin"] = 5900, ["NFLplayer"] = 2100, ["NFT"] = 6800, ["NFT_player"] = 30000, ["NGA"] = 3200, ["NGR"] = 2300, ["NHLE"] = 18000, ["NHLS_url"] = 2200, ["NLD"] = 11000, ["NLM_content"] = 2800, ["NOINDEX"] = 449000, ["NOMIS2011"] = 2300, ["NOR"] = 9400, ["NRDB_species"] = 6900, ["NRHP-PA"] = 2600, ["NRHPGoogleMapFootnote"] = 2500, ["NRHP_Focus"] = 76000, ["NRHP_color"] = 3700, ["NRHP_date_for_lists"] = 3100, ["NRHP_date_for_lists/dates"] = 3100, ["NRHP_header"] = 3300, ["NRHP_navigation_box"] = 8300, ["NRHP_row"] = 3400, ["NRHP_style"] = 70000, ["NRHP_url"] = 29000, ["NRHP_url/core"] = 31000, ["NRISref"] = 73000, ["NSWcity"] = 2100, ["NSWcity/core"] = 2100, ["NUMBEROFSECTIONS"] = 4100, ["NYCS_br"] = 2700, ["NYCS_time_2"] = 3100, ["NZL"] = 6700, ["NZ_electorate_link"] = 2300, ["Na"] = 2400, ["Nac"] = 2700, ["Namespace_detect"] = 569000, ["Namespace_detect_showall"] = 10000, ["Nastaliq"] = 10000, ["Nat_fs_end"] = 2400, ["National_Film_Awards/style"] = 2000, ["National_Heritage_List_for_England"] = 22000, ["National_Rail_style"] = 5700, ["National_Register_of_Historic_Places"] = 29000, ["National_Register_of_Historic_Places_in_Massachusetts"] = 4400, ["National_Register_of_Historic_Places_in_New_York"] = 5600, ["National_Register_of_Historic_Places_in_North_Carolina"] = 2900, ["National_Register_of_Historic_Places_in_Pennsylvania"] = 3200, ["National_Register_of_Historic_Places_in_Virginia"] = 3100, ["National_basketball_squad"] = 3300, ["National_field_hockey_squad"] = 4000, ["National_football_squad_end"] = 2900, ["National_football_squad_start/styles.css"] = 2400, ["National_rugby_union_team"] = 3600, ["National_squad"] = 41000, ["National_squad_no_numbers"] = 17000, ["Native_name"] = 17000, ["Native_name_checker"] = 81000, ["Naval"] = 2900, ["Naval/core"] = 2900, ["Navbar"] = 39000, ["Navbar-collapsible"] = 3600, ["Navbar-header"] = 16000, ["Navbar-header/styles.css"] = 16000, ["Navbox"] = 3060000, ["Navbox_GR_munic"] = 3500, ["Navbox_Musical_artist"] = 9800, ["Navbox_bottom"] = 15000, ["Navbox_decade_list"] = 11000, ["Navbox_ice_hockey"] = 3100, ["Navbox_musical_artist"] = 220000, ["Navbox_musical_artist/color"] = 220000, ["Navbox_rugby_league_squad"] = 4900, ["Navbox_season_by_team"] = 3100, ["Navbox_top"] = 15000, ["Navbox_with_collapsible_groups"] = 131000, ["Navbox_with_collapsible_sections"] = 2300, ["Navbox_with_columns"] = 24000, ["Navboxes"] = 55000, ["Navboxes_colour"] = 5200, ["Navseasoncats"] = 480000, ["Navseasoncats_with_centuries_below_decade"] = 6700, ["Navseasoncats_with_decades_below_year"] = 18000, ["Navsource"] = 2500, ["Navy"] = 19000, ["Navy/core"] = 19000, ["Nay"] = 19000, ["Nbay"] = 5600, ["Nbsp"] = 483000, ["Nbsp_to_space"] = 20000, ["Ndash"] = 20000, ["Nee"] = 9200, ["NeilBrownPlayers"] = 3100, ["New_user_bar"] = 57000, ["Newbot"] = 4200, ["Next_period"] = 21000, ["Nfly"] = 2200, ["Nihongo"] = 102000, ["Nihongo2"] = 12000, ["Nihongo_foot"] = 2600, ["No"] = 8400, ["No."] = 14000, ["No2"] = 10000, ["NoSpam"] = 3900, ["NoSpamEmail"] = 17000, ["No_col_break"] = 2300, ["No_col_break/styles.css"] = 2300, ["No_footnotes"] = 51000, ["No_ping"] = 377000, ["No_plot"] = 6100, ["No_redirect"] = 570000, ["No_spam"] = 305000, ["No_wrap"] = 2400, ["Nobold"] = 384000, ["Nobold/styles.css"] = 384000, ["Nobr"] = 4800, ["Nobreak"] = 28000, ["Nochange"] = 2400, ["Noindex"] = 4800, ["Noitalic"] = 4500, ["Noitalic/styles.css"] = 4500, ["Nom"] = 40000, ["Nominated"] = 7200, ["Non-English-language_text_category"] = 2600, ["Non-admin_closure"] = 2900, ["Non-diffusing_subcategory"] = 14000, ["Non-free_2D_art"] = 7200, ["Non-free_3D_art"] = 2500, ["Non-free_album_cover"] = 203000, ["Non-free_audio_sample"] = 8400, ["Non-free_biog-pic"] = 25000, ["Non-free_book_cover"] = 55000, ["Non-free_character"] = 2300, ["Non-free_comic"] = 11000, ["Non-free_fair_use"] = 17000, ["Non-free_fair_use_in"] = 14000, ["Non-free_film_poster"] = 24000, ["Non-free_film_screenshot"] = 5000, ["Non-free_game_cover"] = 7600, ["Non-free_game_screenshot"] = 4700, ["Non-free_historic_image"] = 16000, ["Non-free_image_data"] = 8600, ["Non-free_image_rationale"] = 9700, ["Non-free_logo"] = 162000, ["Non-free_magazine_cover"] = 7700, ["Non-free_media"] = 732000, ["Non-free_media_data"] = 9800, ["Non-free_media_rationale"] = 11000, ["Non-free_movie_poster"] = 23000, ["Non-free_newspaper_image"] = 2000, ["Non-free_poster"] = 80000, ["Non-free_promotional"] = 8800, ["Non-free_school_logo"] = 2400, ["Non-free_seal"] = 4500, ["Non-free_symbol"] = 6100, ["Non-free_television_screenshot"] = 16000, ["Non-free_title-card"] = 5700, ["Non-free_use_rationale"] = 462000, ["Non-free_use_rationale/styles.css"] = 684000, ["Non-free_use_rationale_2"] = 212000, ["Non-free_use_rationale_album_cover"] = 136000, ["Non-free_use_rationale_book_cover"] = 19000, ["Non-free_use_rationale_logo"] = 94000, ["Non-free_use_rationale_poster"] = 52000, ["Non-free_use_rationale_title-card"] = 2800, ["Non-free_use_rationale_video_cover"] = 5800, ["Non-free_use_rationale_video_game_cover"] = 10000, ["Non-free_video_cover"] = 16000, ["Non-free_video_game_cover"] = 21000, ["Non-free_video_game_cover/platform"] = 21000, ["Non-free_video_game_screenshot"] = 10000, ["Non-free_video_game_screenshot/platform"] = 9600, ["Non-free_with_NC"] = 2700, ["Non-free_with_permission"] = 2100, ["Nonspecific"] = 2200, ["Nonumtoc"] = 2700, ["Nonumtoc/styles.css"] = 2700, ["Noping"] = 367000, ["Noprint"] = 2900, ["Noredirect"] = 8300, ["Normal"] = 5900, ["Normalwraplink"] = 3500, ["NorthAmNative"] = 2000, ["North_America_topic"] = 3500, ["Northern_Ireland_tasks"] = 20000, ["Nospam"] = 21000, ["Not-PD-US-expired-min-year"] = 26000, ["Not_a_ballot"] = 7700, ["Not_a_forum"] = 7700, ["Not_a_typo"] = 11000, ["Not_around"] = 2900, ["Not_done"] = 20000, ["Notability"] = 63000, ["Notavote"] = 2100, ["Notdone"] = 5500, ["Note"] = 25000, ["NoteFoot"] = 4100, ["NoteTag"] = 4100, ["Note_label"] = 9100, ["Notelist"] = 185000, ["Notelist-lr"] = 3500, ["Notelist-ua"] = 6800, ["Notes"] = 6000, ["Noteslist"] = 3700, ["Notice"] = 113000, ["NovelsWikiProject"] = 19000, ["Nowiki_="] = 2300, ["Nowrap"] = 838000, ["Np"] = 2900, ["Npby"] = 2500, ["Nq"] = 3700, ["Nrut"] = 3600, ["Ns"] = 2700, ["Ns0"] = 108000, ["Ns_has_subpages"] = 2190000, ["Nts"] = 20000, ["Ntsh"] = 3300, ["Number_of_defined_parameters"] = 4800, ["Number_table_sorting"] = 35000, ["Number_table_sorting_hidden"] = 3300, ["Number_to_word"] = 7300, ["Numero"] = 3600, ["Nutshell"] = 3900, ["Nw="] = 2300, ["Née"] = 2000, ["Module:NUMBEROFSECTIONS"] = 4100, ["Module:Namespace_detect"] = 16000000, ["Module:Namespace_detect/config"] = 17100000, ["Module:Namespace_detect/data"] = 17100000, ["Module:National_squad"] = 54000, ["Module:Native_name"] = 92000, ["Module:Navbar"] = 5420000, ["Module:Navbar/configuration"] = 5420000, ["Module:Navbar/styles.css"] = 4780000, ["Module:Navbox"] = 4430000, ["Module:Navbox/configuration"] = 4430000, ["Module:Navbox/styles.css"] = 4430000, ["Module:Navbox_ice_hockey"] = 3100, ["Module:Navbox_top_and_bottom"] = 15000, ["Module:Navbox_with_collapsible_groups"] = 139000, ["Module:Navboxes"] = 56000, ["Module:Navseasoncats"] = 480000, ["Module:Nihongo"] = 104000, ["Module:No_ping"] = 448000, ["Module:Noinclude"] = 21000, ["Module:Ns_has_subpages"] = 2190000, ["Module:Number_table_sorting"] = 37000, } f30fe9f5749b2426243f9520857276ca1f5e968d Module:Message box/ombox.css 828 925 1842 1841 2023-07-15T16:48:59Z Richard Robin 2 已从[[:wikipedia:Module:Message_box/ombox.css]]导入1个版本 sanitized-css text/css /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: #f8f9fa; box-sizing: border-box; } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } 8fe3df4bb607e699eab2dbd23bd4a1a446391002 Template:Navbox/doc 10 926 1844 1843 2023-07-15T16:48:59Z Richard Robin 2 已从[[:wikipedia:Template:Navbox/doc]]导入1个版本 wikitext text/x-wiki {{for|vertically-aligned navigation|Template:Sidebar}} {{documentation subpage}} {{high-use|all-pages=y}} {{Template display|nomobile}} {{Lua|Module:Navbox}} {{Navbox suite}} {{Lua sidebar}} This template allows a [[Wikipedia:Navigation template|navigational template]] to be set up relatively quickly by supplying it with one or more lists of links. It comes equipped with default styles that should work for most navigational templates. Changing the default styles is possible, but not recommended. Using this template, or one of its "Navbox suite" sister templates, is highly recommended for standardization of navigational templates, and for ease of use. {{Navbox visibility}} == Usage == Please remove the parameters that are left blank. <pre style="overflow: auto;">{{Navbox | name = {{subst:PAGENAME}}{{subst:void|Don't change anything on this line. It will change itself when you save.}} | title = | listclass = hlist | state = {{{state|}}} | above = | image = | group1 = | list1 = | group2 = | list2 = | group3 = | list3 = <!-- ... --> | below = }} </pre> == Parameter list == {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | title = {{{title}}} | above = {{{above}}} | image = {{{image}}} | group1 = {{{group1}}} | list1 = {{{list1}}} | group2 = {{{group2}}} | list2 = {{{list2}}} | group3 = {{{group3}}} | list3 = {{{list3}}} | group4 = {{{group4}}} | list4 = {{{list4}}} | below = {{{below}}} <br /> See alternate navbox formats under: [[#Layout of table|''Layout of table'']] }} The navbox uses lowercase parameter names, as shown in the box (''above''). The required ''name'' and ''title'' will create a one-line box if other parameters are omitted. Notice "group1" (etc.) is optional, as are sections named "above/below". {{clear}} The basic and most common parameters are as follows (see [[#Parameter descriptions|below]] for the full list): : <code>name</code> – the name (Wikipedia location) of the template. : <code>title</code> – text in the title bar, such as: <nowiki>[[Widget stuff]]</nowiki>. : <code>listclass</code> – a CSS class for the list cells, usually <code>hlist</code> for horizontal lists. Alternatively, use bodyclass for the whole box. : <code>state</code> – controls when a navbox is expanded or collapsed. : <code>titlestyle</code> – a CSS style for the title-bar, such as: <code>background: gray;</code> : <code>groupstyle</code> – a CSS style for the group-cells, such as: <code>background: #eee;</code> : <code>above</code> – text to appear above the group/list section (could be a list of overall wikilinks). : <code>image</code> – an optional right-side image, coded as the whole image, such as: <code><nowiki>[[File:</nowiki><var>XX</var><nowiki>.jpg|80px|link=|alt=]]</nowiki></code> :: Note that most of such images don't comply with [[MOS:DECOR]] and should be removed at sight. : <code>imageleft</code> – an optional left-side image (code the same as the "image" parameter). : <code>group<sub>n</sub></code> – the left-side text before list-n (if group-n omitted, list-n extends to the left edge of the box, and defaults to <code>text-align:center</code> styling). : <code>list<sub>n</sub></code> – text listing wikilinks using a [[Help:List|wikilist]] format. : <code>below</code> – optional text to appear below the group/list section. == Parameter descriptions == The following is a complete list of parameters for using {{tl|Navbox}}. In most cases, the only required parameters are <code>name</code>, <code>title</code>, and <code>list1</code>, though [[Template:Navbox/doc#Child navboxes|child navboxes]] do not even require those to be set. {{tl|Navbox}} shares numerous common parameter names with its sister templates, {{tl|Navbox with columns}} and {{tl|Navbox with collapsible groups}}, for consistency and ease of use. Parameters marked with an asterisk (*) are common to all three master templates. === Setup parameters === ; ''name''* : The name of the template, which is needed for the "V&nbsp;• T&nbsp;• E" ("View&nbsp;• Talk&nbsp;• Edit") links to work properly on all pages where the template is used. You can enter <code><nowiki>{{subst:PAGENAME}}</nowiki></code> for this value as a shortcut. The name parameter is only mandatory if a <code>title</code> is specified, and the <code>border</code> parameter is not set, and the <code>navbar</code> parameter is not used to disable the navbar. ; ''state''* <span style="font-weight:normal;">[<code>autocollapse, collapsed, expanded, plain, off</code>]</span> :* Defaults to <code>autocollapse</code>. A navbox with <code>autocollapse</code> will start out collapsed if there are two or more collapsible elements on the same page. Otherwise, the navbox will be expanded. For the technically minded, see [[MediaWiki:Common.js]] (search for "autocollapse"). :* If set to <code>collapsed</code>, the navbox will always start out in a collapsed state. :* If set to <code>expanded</code>, the navbox will always start out in an expanded state. :* If set to <code>plain</code>, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the <small>V&nbsp;• T&nbsp;• E</small> links). :* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden. : To show the box when standalone (non-included) but then auto-hide contents when in an article, put "expanded" inside {{tag|noinclude|p}} tags. This setting will force the box to be visible when standalone (even when followed by other boxes), displaying "[hide]", but then it will auto-collapse the box when stacked inside an article: :: <code><nowiki>| state =&nbsp;</nowiki></code>{{tag|noinclude|content=expanded}} :Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this: :* In your intermediate template, create a parameter also named "state" as a pass-through like this: <pre><nowiki>| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}</nowiki></pre> :* The {{tag|includeonly|o}}<code>|</code> will make the template expanded when viewing the template page by itself. :** Example 1: {{tl|Peso}} with ''autocollapse'' as the default initial state. [[Catalan peseta]] transcludes it and has only one navbox; thus, the peso navbox shows. [[Chilean peso]] has more than two navboxes; thus, the peso navbox collapses. :** Example 2: {{tl|Historical currencies of Hungary}} with ''expanded'' as the default initial state, as such: <pre>| state = {{{state<includeonly>|expanded</includeonly>}}}</pre> All transcluding articles show the content by default, unless there is a hypothetical article that specifies <code><nowiki>{{templatename|state=collapsed}}</nowiki></code> when transcluding. :** Example 3: {{tl|Tourism}} with ''collapsed'' as the default initial state, as such: <pre>| state = {{{state<includeonly>|collapsed</includeonly>}}}</pre> All transcluding articles will show the template as collapsed by default, but the template will still be uncollapsed when displayed on its own page. :* The template {{tl|Collapsible option}} explains how to use the <code>state</code> parameter. It can be added to a {{tag|noinclude|p}} section after the template definition or to the instructions on the {{tl|documentation subpage}}. ; ''navbar''* : If set to <code>plain</code>, the <span style="font-size: 88%;">V&nbsp;• T&nbsp;• E</span> links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Use <code>off</code> to remove the <span style="font-size: 88%;">V&nbsp;• T&nbsp;• E</span> links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). It is highly recommended that one not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages. ; ''border''* : ''See later section on [[#Child navboxes|using navboxes within one another]] for examples and a more complete description.'' If set to <code>child</code> or <code>subgroup</code>, then the navbox can be used as a borderless child that fits snugly in another navbox. The border is hidden and there is no padding on the sides of the table, so it fits into the ''list'' area of its parent navbox. If set to <code>none</code>, then the border is hidden and padding is removed, and the navbox may be used as a child of another container (do not use the <code>none</code> option inside of another navbox; similarly, only use the <code>child</code>/<code>subgroup</code> option inside of another navbox). If set to anything else (default), then a regular navbox is displayed with a 1px border. An alternate way to specify the border to be a subgroup style is like this (i.e. use the first unnamed parameter instead of the named ''border'' parameter): :<pre>{{Navbox|child|...}}</pre> === Cells === ; ''title''* : Text that appears centered in the top row of the table. It is usually the template's topic, i.e. a succinct description of the body contents. This should be a single line, but if a second line is needed, use <code><nowiki>{{-}}</nowiki></code> to ensure proper centering. This parameter is technically not mandatory, but using {{tl|Navbox}} is rather pointless without a title. ; ''above''* : A full-width cell displayed between the titlebar and first group/list, i.e. ''above'' the template's body (groups, lists and image). In a template without an image, ''above'' behaves in the same way as the ''list1'' parameter without the ''group1'' parameter. ; ''group<sub>n</sub>''* : (i.e. ''group1'', ''group2'', etc.) If specified, text appears in a header cell displayed to the left of ''list<sub>n</sub>''. If omitted, ''list<sub>n</sub>'' uses the full width of the table. ; ''list<sub>n</sub>''* : (i.e. ''list1'', ''list2'', etc.) The body of the template, usually a list of links. Format is inline, although the text can be entered on separate lines if the entire list is enclosed within <code><nowiki><div> </div></nowiki></code>. At least one ''list'' parameter is required; each additional ''list'' is displayed in a separate row of the table. Each ''list<sub>n</sub>'' may be preceded by a corresponding ''group<sub>n</sub>'' parameter, if provided (see below). :Entries should be separated using a [[newline]] and an [[asterisk]] (*). If instead two asterisks are used, it provides [[Nesting (computing)|nesting]] within the previous entry by enclosing the entry with brackets. Increasing the number of asterisks used increases the number of brackets around entries. ; ''image''* : An image to be displayed in a cell below the title and to the right of the body (the groups/lists). For the image to display properly, the ''list1'' parameter must be specified. The ''image'' parameter accepts standard wikicode for displaying an image, ''e.g.'': <pre>[[File:</nowiki><var>XX</var><nowiki>.jpg|80px|link=|alt=]]</pre> nb: including "|right" will produce the usual left margin to provide separation from the list items and [[Zebra striping (computer graphics)|zebra striping]]. :Note that most of such images don't comply with [[MOS:DECOR]] and should be removed at sight. A rare example of a correct usage would be [[special:permalink/995622594|this one]]: a map shows (in green) the location of a region within the state of Kazakhstan, and this is consistently implemented for [[:category:Kazakhstan region templates|all state's regions]]. ; ''imageleft''* : An image to be displayed in a cell below the title and to the left of the body (lists). For the image to display properly, the ''list1'' parameter must be specified and no groups can be specified. It accepts the same sort of parameter that ''image'' accepts. ; ''below''* : A full-width cell displayed ''below'' the template's body (groups, lists and image). In a template without an image, ''below'' behaves in the same way as the template's final ''list<sub>n</sub>'' parameter without a ''group<sub>n</sub>'' parameter. For an example of the ''below'' parameter in use, see {{oldid|Main Page|352612160|this}} version of {{tl|Lists of the provinces and territories of Canada}}. {{tl|icon}} is often used for non-article links, for example <code><nowiki>{{icon|category}} [[:Category:</nowiki>''name''<nowiki>|Category]]</nowiki></code>. === Style parameters === Styles are generally advised against, to maintain consistency among templates and pages in Wikipedia; but the option to modify styles is given. ; ''bodystyle''* : Specifies [[Cascading Style Sheets|CSS]] styles to apply to the template body. This option should be used sparingly as it can lead to visual inconsistencies. Examples: :* <code>bodystyle = background: #''nnnnnn'';</code> :* <code>bodystyle = width: ''N''&nbsp;[em/%/px or width: auto];</code> :* <code>bodystyle = float: [''left/right/none''];</code> :* <code>bodystyle = clear: [''right/left/both/none''];</code> ; ''basestyle''* : CSS styles to apply to the ''title'', ''above'', ''below'', and ''group'' cells all at once. The styles are not applied to ''list'' cells. This is convenient for easily changing the basic color of the navbox without having to repeat the style specifications for the different parts of the navbox. Example: <code>basestyle = background: lightskyblue;</code> ; ''titlestyle''* : [[Cascading Style Sheets|CSS]] styles to apply to ''title'', most often the titlebar's background color: :* <code>titlestyle = background: ''#nnnnnn'';</code> :* <code>titlestyle = background: ''name'';</code> :* <code>titlestyle = background: none;</code> — for no background color ; ''groupstyle''* : CSS styles to apply to the ''groupN'' cells. This option overrides any styles that are applied to the entire table. Examples: :* <code>groupstyle = background: #''nnnnnn'';</code> :* <code>groupstyle = text-align: [''left/center/right''];</code> :* <code>groupstyle = vertical-align: [''top/middle/bottom''];</code> ; ''group<sub>n</sub>style''* : CSS styles to apply to a specific group, in addition to any styles specified by the ''groupstyle'' parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Example: <code>group3style = background: red; color: white;</code> ; ''groupwidth'' : A number and unit specifying a uniform width for the group cells, in cases where little content in the list cells may cause group cells to be too wide. No default. However, may be overridden by the ''group(n)style'' parameter. Example: <code>groupwidth = 9em</code> ; ''liststyle''* : CSS styles to apply to all lists. Overruled by the ''oddstyle'' and ''evenstyle'' parameters (if specified) hereafter. When using backgound colors in the navbox, see the [[#Intricacies|note hereafter]]. ; ''list<sub>n</sub>style''* : CSS styles to apply to a specific list, in addition to any styles specified by the ''liststyle'' parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Example: <code>list5style = background: #ddddff;</code> ; ''listpadding''* : A number and unit specifying the padding in each ''list'' cell. The ''list'' cells come equipped with a default padding of 0.25em on the left and right, and 0 on the top and bottom. Due to complex technical reasons, simply setting "liststyle = padding: 0.5em;" (or any other padding setting) will not work. Examples: :* <code>listpadding = 0.5em 0;</code> (sets 0.5em padding for the top/bottom, and 0 padding for the left/right.) :* <code>listpadding = 0;</code> (removes all list padding.) ; ''oddstyle'' ; ''evenstyle'' : Applies to odd/even list numbers. Overrules styles defined by ''liststyle''. The default behavior is to add striped colors (white and gray) to odd/even rows, respectively, in order to improve readability. These should not be changed except in extraordinary circumstances. ; ''evenodd'' <span style="font-weight: normal;"><code>[swap, even, odd, off]</code></span> : If set to <code>swap</code>, then the automatic striping of even and odd rows is reversed. Normally, even rows get a light gray background for striping; when this parameter is used, the odd rows receive the gray striping instead of the even rows. Setting to <code>even</code> or <code>odd</code> sets all rows to have that striping color. Setting to <code>off</code> disables automatic row striping. ; ''abovestyle''* ; ''belowstyle''* : CSS styles to apply to the top cell (specified via the ''above'' parameter) and bottom cell (specified via the ''below'' parameter). Typically used to set background color or text alignment: :* <code>abovestyle = background: #''nnnnnn'';</code> :* <code>abovestyle = text-align: [''left/center/right''];</code> :* <code>belowstyle = background: #''nnnnnn'';</code> :* <code>belowstyle = text-align: [''left/center/right''];</code> ; ''imagestyle''* ; ''imageleftstyle''* : CSS styles to apply to the cells where the image/imageleft sits. These styles should only be used in exceptional circumstances, usually to fix width problems if the width of groups is set and the width of the image cell grows too large. Example: <code>imagestyle = width:5em;</code> ===== Default styles ===== The style settings listed here are those that editors using the navbox change most often. The other more complex style settings were left out of this list to keep it simple. Most styles are set in [[MediaWiki:Common.css]]. <syntaxhighlight lang="css"> bodystyle = background: #fdfdfd; width: 100%; vertical-align: middle; titlestyle = background: #ccccff; padding-left: 1em; padding-right: 1em; text-align: center; abovestyle = background: #ddddff; padding-left: 1em; padding-right: 1em; text-align: center; belowstyle = background: #ddddff; padding-left: 1em; padding-right: 1em; text-align: center; groupstyle = background: #ddddff; padding-left: 1em; padding-right: 1em; text-align: right; liststyle = background: transparent; text-align: left/center; oddstyle = background: transparent; evenstyle = background: #f7f7f7; </syntaxhighlight> Since ''liststyle'' and ''oddstyle'' are transparent, odd lists have the color of the ''bodystyle'', which defaults to #fdfdfd (white with a hint of gray). A list defaults to <code>text-align: left;</code> if it has a group, if not it defaults to <code>text-align: center;</code>. Since only ''bodystyle'' has a vertical-align all the others inherit its <code>vertical-align: middle;</code>. === Advanced parameters === ; ''bodyclass'' ; ''aboveclass'' ; ''groupclass'' ; ''listclass'' ; ''belowclass'' : This enables attaching a CSS class to group or list cells. The most common use for ''listclass'' is to give it the <code>hlist</code> class that will cause lists to render horizontally. All these parameters accept the <code>hlist</code> class, but if more than one parameter is used for <code>hlist</code>, use {{para|bodyclass|hlist}} instead. ; ''innerstyle'' : A very advanced parameter to be used ''only'' for advanced meta-templates employing the navbox. Internally, the navbox uses an outer table to draw the border, and then an inner table for everything else (title/above/groups/lists/below/images, etc.). The ''style''/''bodystyle'' parameter sets the style for the outer table, which the inner table inherits, but in advanced cases (meta-templates) it may be necessary to directly set the style for the inner table. This parameter provides access to that inner table so styles can be applied. Use at your own risk. ; ''nowrapitems'' : Setting <code>|nowrapitems=yes</code> applies nowrap to each line in a list item, and to any <code>above</code> or <code>below</code> item. ; ''orphan'' : Setting <code>|orphan=yes</code> in a child navbox fixes odd/even striping and removes [[:Category:Navbox orphans]]. ==== Microformats ==== ; ''bodyclass'' : This parameter is inserted into the "class" attribute for the navbox as a whole. ; ''titleclass'' : This parameter is inserted into the "class" attribute for the navbox's title caption. This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a navbox as containing [[hCard]] information about a person, for example, add the following parameter: <pre> | bodyclass = vcard </pre> ''and'' <pre> | titleclass = fn </pre> ''or'' (for example): <pre><nowiki> | title = The books of <span class="fn">[[Iain Banks]]</span> </nowiki></pre> ...and so forth. See [[Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia, and [[microformat]] for more information on microformats in general. == Layout of table == ===Without image, above and below=== Table generated by {{tl|Navbox}} '''without''' ''image'', ''above'' and ''below'' parameters (gray list background color added for illustration only): {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | liststyle = background: silver; | title = {{{title}}} | group1 = {{{group1}}} | list1 = {{{list1}}} | group2 = {{{group2}}} | list2 = {{{list2}}} | list3 = {{{list3}}} ''without {{{group3}}}'' | group4 = {{{group4}}} | list4 = {{{list4}}} }} ===With image, above and below=== Table generated by {{tl|Navbox}} '''with''' ''image'', ''above'' and ''below'' parameters (gray list background color added for illustration only): {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | liststyle = background: silver; | image = {{{image}}} | title = {{{title}}} | above = {{{above}}} | group1 = {{{group1}}} | list1 = {{{list1}}} | group2 = {{{group2}}} | list2 = {{{list2}}} | list3 = {{{list3}}} ''without {{{group3}}}'' | group4 = {{{group4}}} | list4 = {{{list4}}} | below = {{{below}}} }} ===With image and without groups=== Table generated by {{tl|Navbox}} '''with''' ''image'', ''imageleft'', ''lists'', and '''without''' ''groups'', ''above'', ''below'' (gray list background color added for illustration only): {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | liststyle = background: silver; | image = {{{image}}} | imageleft = {{{imageleft}}} | title = {{{title}}} | list1 = {{{list1}}} | list2 = {{{list2}}} | list3 = {{{list3}}} | list4 = {{{list4}}} }} == Examples == <!-- Please do not encourage folks to use <div> within Navboxes as (unless handled carefully) they can negate liststyles/groupstyles/etc. settings. --> === No image === <syntaxhighlight lang="wikitext" style="overflow: auto;"> {{Navbox | name = Navbox/doc | title = [[MSC Malaysia]] | listclass = hlist | group1 = Centre | list1 = * [[Cyberjaya]] | group2 = Area | list2 = * [[Klang Valley]] | group3 = Major landmarks | list3 = * [[Petronas Twin Towers]] * [[Kuala Lumpur Tower]] * [[Kuala Lumpur Sentral]] * [[Technology Park Malaysia]] * [[Putrajaya]] * [[Cyberjaya]] * [[Kuala Lumpur International Airport]] | group4 = Infrastructure | list4 = * [[Express Rail Link]] * [[KL-KLIA Dedicated Expressway]] | group5 = Prime applications | list5 = * [[E-Government]] * [[MyKad]] }} </syntaxhighlight> {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | title = [[MSC Malaysia]] | listclass = hlist | group1 = Centre | list1 = * [[Cyberjaya]] | group2 = Area | list2 = * [[Klang Valley]] | group3 = Major landmarks | list3 = * [[Petronas Twin Towers]] * [[Kuala Lumpur Tower]] * [[Kuala Lumpur Sentral]] * [[Technology Park Malaysia]] * [[Putrajaya]] * [[Cyberjaya]] * [[Kuala Lumpur International Airport]] | group4 = Infrastructure | list4 = * [[Express Rail Link]] * [[KL-KLIA Dedicated Expressway]] | group5 = Prime applications | list5 = * [[E-Government]] * [[MyKad]] }} == Child navboxes == {{Selfref|For additional examples, see the [[Template:Navbox/testcases|Navbox testcases page]].}} It is possible to place multiple navboxes within a single border by using "child" as the first parameter, or by setting the ''border'' parameter. The basic code for doing this is as follows (which adds a subgroup for the first group/list area): <pre style="overflow: auto;"> {{Navbox | name = {{subst:PAGENAME}} | title = Title | group1 = [optional] | list1 = {{Navbox|child ...child navbox parameters... }} ... }} </pre> === Subgroups example === This example shows two subgroups created using <code>child</code> as the first unnamed parameter. The striping is alternated automatically. To remove the striping altogether, you can set <code>liststyle = background:transparent;</code> in each of the navboxes. {{{{PAGENAMETDOC}} | name = Navbox/doc | state = uncollapsed | title = Multiple subgroup example | above = Above | below = Below | group1 = Group1 | list1 = List1 | group2 = Group2 | list2 = {{{{PAGENAMETDOC}}|child | group1 = Group2.1 | list1 = List1 | group2 = Group2.2 | list2 = List2 | group3 = Group2.3 | list3 = List3 }} | group3 = Group3 | list3 = List3 | group4 = Group4 | list4 = {{{{PAGENAMETDOC}}|child | group1 = Group4.1 | list1 = List1 | group2 = Group4.2 | list2 = List2 | group3 = Group4.3 | list3 = List3 }} }} === Multiple show/hides in a single container === {{main|Template:Navbox with collapsible groups}} The example below is generated using a regular navbox for the main container, then its list1, list2, and list3 parameters each contain another navbox, with <code>1 = child</code> set. The view (v), talk (t), edit (e) navbar links are hidden using <code>navbar = plain</code> for each of them, or could be suppressed by just leaving out the ''name'' parameter (child navboxes do not require the name parameter to be set, unlike regular navboxes). {{{{PAGENAMETDOC}} | name = Navbox/doc | title = [[French colonial empire|Former French overseas empire]] | state = uncollapsed | list1 = {{{{PAGENAMETDOC}}|child | navbar = plain | title = [[French colonial empire|Former French colonies]] in [[Africa]] and the [[Indian Ocean]] | listclass = hlist | group1 = [[Mahgreb]] | list1 = * [[French rule in Algeria|Algeria]] * [[French Morocco|Morocco]] <small>([[Arguin|Arguin Island]])</small> * [[History of Tunisia|Tunisia]] | group2 = [[French West Africa]] | list2 = * [[History of Côte d'Ivoire#French Period|Côte d'Ivoire]] * [[French Dahomey|Dahomey]] * [[French Sudan]] * [[French Guinea|Guinea]] * [[History of Mauritania#French colonization and post-colonial history|Mauritania]] * [[History of Niger#Colonization|Niger]] * [[History of Senegal|Senegal]] * [[French Upper Volta|Upper Volta]] * [[French Togoland]] * [[James Island (The Gambia)|James Island]] | group3 = [[French Equatorial Africa]] | list3 = * [[Colonial Chad|Chad]] * [[History of Gabon|Gabon]] * [[History of the Republic of the Congo|Middle Congo]] * [[Oubangui-Chari]] | group4 = [[Comoros]] | list4 = * [[Anjouan]] * [[Grande Comore]] * [[Mohéli]] * [[History of Djibouti#French Interest|French Somaliland (Djibouti)]] * [[History of Madagascar#French control|Madagascar]] * [[Mauritius|Ile de France]] * [[Seychelles]] }} | list2 = {{{{PAGENAMETDOC}}|child | navbar = plain | title = [[French colonial empire|Former French colonies]] in the [[Americas]] | listclass = hlist | list1 = * [[New France]]{{spaces|2}}<small>([[Acadia]], [[Louisiana (New France)|Louisiana]], [[Canada, New France|Canada]], [[Newfoundland (island)|Terre Neuve]]) 1655–1763 </small> | list2 = * [[Inini]] * [[Berbice]] * [[Saint-Domingue]] * <small>[[Haiti]]</small> * [[Tobago]] * [[History of the British Virgin Islands|Virgin Islands]] * [[France Antarctique]] * [[France Équinoxiale]] | below = [[French West India Company]] }} | list3 = {{{{PAGENAMETDOC}}|child | navbar = plain | title = [[French colonial empire|Former French colonies]] in [[Asia]] and [[Oceania]] | listclass = hlist | group1 = [[French India]] | list1 = * [[Chandernagor]] * [[Coromandel Coast]] * [[History of Chennai|Madras]] * [[Mahé, India|Mahé]] * [[History of Pondicherry|Pondichéry]] * [[Karaikal]] * [[Yanam (India)|Yanaon]] | group2 = [[French Indochina]] | list2 = * [[Colonial Cambodia|Cambodia]] * [[History of Laos to 1945#French Laos|Laos]] * [[French Indochina|Vietnam]] <small>([[Annam (French colony)|Annam]], [[Cochinchina]], [[Tonkin]])</small> | group3 = Other Asian | list3 = * [[Alawite State|Alaouites]] * [[Republic of Hatay|Alexandretta-Hatay]] * [[Sri Lanka|Ceylon]] * [[Kwangchowan]] | group4 = [[Oceania]] | list4 = * [[New Hebrides]] ** [[History of Vanuatu|Vanuatu]] | below = [[French East India Company]] }} }} == Relationship with other Navbox templates == This navbox template works in conjunction with two other templates: {{tl|Navbox with columns}} and {{tl|Navbox with collapsible groups}}. All three of these templates share common parameters for consistency and ease of use (such parameters are marked with an asterisk (*) in the [[#Parameter descriptions|parameter descriptions]] list hereinbefore). Most importantly, each template can be used as a child of one another (by using the {{para|border|child}} parameter, or by specifying the first unnamed parameter to be <code>child</code>. For example: <code><nowiki>{{Navbox|child ...}}</nowiki></code>, <code><nowiki>{{Navbox with columns|child ...}}</nowiki></code> or <code><nowiki>{{Navbox with collapsible groups|child ...}}</nowiki></code>.) == Technical details == * The {{navbar|1=:{{FULLPAGENAME}}|mini=on}} links are produced by [[Template:Navbar]]. If you have a question about them, it is probably best to ask at [[Template talk:Navbar]]. * The 2px wide border between groups and lists is drawn using the border-left property of the list cell. Thus, if you wish to change the background color of the template (for example <code>bodystyle = background:purple;</code>), then you'll need to make the border-left-color match the background color (i.e. <code>liststyle = border-left-color: purple;</code>). If you wish to have a border around each list cell, then the 2px border between the list cells and group cells will disappear; you'll have to come up with your own solution. * Adjacent navboxes have only a 1 pixel border between them. If you set the top or bottom margin of <code>style/bodystyle</code>, then this will not work. * The default margin-left and margin-right of the outer navbox table are set to "auto;". If you wish to use navbox as a float, you need to manually set the margin-left and margin-right values, because the auto margins interfere with the float option. For example, add the following code to use the navbox as a float: ** <code>bodystyle = width: 22em; float: right; margin-left: 1em; margin-right: 0;</code> === Copying to other projects or wikis === If you are trying to copy {{tlf|Navbox}} to your local wiki, there are several other things that must be installed or copied over as well: * The [[mw:Extension:Scribunto|Scribunto]] and [[:mw:Extension:TemplateStyles|TemplateStyles]] extensions must be installed. * [[Module:Navbox]] and its module and TemplateStyles dependencies, listed in the above two links * Optionally, the <code>Add support to mw-collapsible for autocollapse, innercollapse and outercollapse</code> script from [[MediaWiki:Common.js]] may be copied, if autocollapsing is desired. == TemplateData == {{TemplateDataHeader}} <templatedata> { "params": { "state": { "label": "State", "description": "Controls when a navbox is expanded or collapsed", "example": "autocollapse", "suggestedvalues": [ "autocollapse", "collapsed", "expanded", "plain", "off" ], "default": "autocollapse", "suggested": true }, "title": { "label": "Title", "description": "Text in the title bar; centered in the top row of the table. Usually the template's topic.", "example": "[[Widget stuff]]", "suggested": true }, "above": { "label": "Above", "description": "Full-width cell displayed between the titlebar and first group/list, i.e. above the template's body (groups, lists and image)", "type": "string", "suggested": true }, "image": { "label": "Image", "description": "Image to be displayed in a cell below the title and to the right of the body", "example": "[[File:XX.jpg | 80px | link= | alt= ]]", "type": "wiki-file-name", "suggested": true }, "group1": { "label": "Group 1", "description": "If specified, text appears in a header cell displayed to the left of list 1. If omitted, list 1 uses the full width of the table.", "suggested": true }, "list1": { "label": "List 1", "description": "Body of the template; usually a list of links. Format is inline. At least one list parameter is required; each additional list is displayed in a separate row of the table. Each listn may be preceded by a corresponding groupn parameter.\nEntries should be separated using a newline and an asterisk. If two asterisks are used, it provides nesting within the previous entry with brackets.", "required": true, "suggested": true }, "group2": { "suggested": true }, "list2": { "suggested": true }, "list3": { "suggested": true }, "group3": { "suggested": true }, "group4": {}, "list4": {}, "below": { "label": "Below", "description": "Full-width cell displayed below the template's body.", "suggested": true }, "imageleft": { "label": "Image left", "description": "Image to be displayed in a cell below the title and to the left of the body. For the image to display properly, list1 parameter must be specified and no groups can be specified.", "example": "[[File:XX.jpg | 80px | link= | alt= ]]", "type": "wiki-file-name" }, "name": { "label": "Name", "description": "The name of the template. Needed for \"View • Talk • Edit\" links to work properly.", "type": "string", "default": "{{subst:PAGENAME}}{{subst:void|Don't change anything on this line. It will change itself when you save.}}", "suggested": true }, "listclass": { "label": "List class", "description": "CSS class for the list cells, usually hlist for horizontal lists. Alternatively, use bodyclass for the whole box.", "example": "hlist", "type": "string" }, "navbar": { "label": "Navbar status", "example": "plain, off", "type": "string" }, "border": { "label": "Border status", "example": "child, subgroup, none", "type": "string" }, "bodystyle": {}, "basestyle": {}, "titlestyle": {}, "groupstyle": {}, "group1style": {}, "groupwidth": {}, "liststyle": {}, "list1style": {}, "listpadding": {}, "oddstyle": {}, "evenstyle": {}, "evenodd": { "suggestedvalues": [ "swap", "even", "odd", "off" ] }, "abovestyle": {}, "belowstyle": {}, "imagestyle": {}, "imageleftstyle": {} }, "description": "Creates a navigational box for links to other pages. \nDoes not display in mobile.", "paramOrder": [ "name", "title", "group1", "list1", "listclass", "state", "above", "below", "image", "group2", "list2", "group3", "list3", "group4", "list4", "imageleft", "navbar", "border", "bodystyle", "basestyle", "titlestyle", "groupstyle", "liststyle", "group1style", "list1style", "groupwidth", "listpadding", "oddstyle", "evenstyle", "evenodd", "abovestyle", "belowstyle", "imagestyle", "imageleftstyle" ] } </templatedata> == See also == * {{tl|Navboxes}} — groups several navigation boxes together. * {{tl|Nobold}} — To display text at normal font-weight within a context where the default font-weight is bold, e.g. header cells in tables. * {{tl|Sidebar}} — Vertically-aligned navigation templates. * {{tl|Navbox documentation}} — Shows the standard documentation using {{tl|Documentation}}. * [[Template:Navbox/testcases]] — For additional examples of template code. * [[Wikipedia:Line-break handling]] — The how-to guide about how to handle word wraps (line breaks) on Wikipedia, such as the wrapping of the link lists used in navboxes. * [[Wikipedia:Template documentation]] — Guideline to creating the accompanying documentation * {{tl|Nowrap begin}}, {{tl|·}} and {{tl|•}} are '''deprecated''' in favor of the <code>hlist</code> class for formatting lists. See [[Template:Flatlist#Technical details|Flatlist]] for a technical explanation of how <code>hlist</code> works. === Tracking categories === * {{clc|Navbox orphans}} * {{clc|Navigational boxes without horizontal lists}} * {{clc|Navboxes using background colours}} * {{clc|Potentially illegible navboxes}} * {{clc|Navboxes using borders}} {{Navigation templates}} <includeonly>{{sandbox other|| <!-- Add categories below this line, and interwikis at Wikidata --> [[Category:Navbox meta-templates| ]] [[Category:Templates generating microformats]] [[Category:Templates that are not mobile friendly]] [[Category:Collapse templates]] }}</includeonly> 9e90e22fb30660a9f5ff9794e7db044743e4c14d Template:Plainlist/styles.css 10 927 1846 1845 2023-07-15T16:49:00Z Richard Robin 2 已从[[:wikipedia:Template:Plainlist/styles.css]]导入1个版本 sanitized-css text/css /* {{pp-template|small=yes}} */ .plainlist ol, .plainlist ul { line-height: inherit; list-style: none; margin: 0; padding: 0; /* Reset Minerva default */ } .plainlist ol li, .plainlist ul li { margin-bottom: 0; } 51706efa229ff8794c0d94f260a208e7c5e6ec30 Template:Hlist/styles.css 10 928 1848 1847 2023-07-15T16:49:00Z Richard Robin 2 已从[[:wikipedia:Template:Hlist/styles.css]]导入1个版本 sanitized-css text/css /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } 8c9dd9c9c00f30eead17fe10f51d183333e81f33 Template:Dated maintenance category (articles) 10 929 1850 1849 2023-07-15T16:49:00Z Richard Robin 2 已从[[:wikipedia:Template:Dated_maintenance_category_(articles)]]导入1个版本 wikitext text/x-wiki {{Dated maintenance category |onlyarticles=yes |1={{{1|}}} |2={{{2|}}} |3={{{3|}}} |4={{{4|}}} |5={{{5|}}} }}<noinclude> {{documentation|Template:Dated maintenance category/doc}} </noinclude> 6bbc57c75cc28708a0e71dd658224d5945d80d68 Template:MessageBox 10 930 1852 1851 2023-07-15T16:49:52Z Richard Robin 2 已从[[:dev:Template:MessageBox]]导入1个版本 wikitext text/x-wiki <div style="width: {{#if:{{{width|}}}|{{{width}}}|80%}}; background-color: {{#if:{{{Background color}}}|{{{Background color}}}|#f5f5f5}}; border-top: 1px solid {{#if:{{{Border color}}}|{{{Border color}}}|#aaaaaa}}; border-bottom: 1px solid {{#if:{{{Border color}}}|{{{Border color}}}|#aaaaaa}}; border-right: 1px solid {{#if:{{{Border color}}}|{{{Border color}}}|#aaaaaa}}; border-left: 12px solid {{#if:{{{Flag color}}}|{{{Flag color}}}|#aaaaaa}}; margin: 0.5em auto 0.5em;"> {| {{#if:{{{Image}}}|{{!}}style="width:93px; text-align:center; vertical-align:middle; padding-top:1px;padding-bottom:7px" {{!}} {{{Image}}} }} |style="vertical-align:middle;padding-left:3px;padding-top:10px;padding-bottom:10px;padding-right:10px; background-color: {{#if:{{{Background color}}}{{!}}{{{Background color}}}{{!}}#f5f5f5}};" | {{{Message text}}} |} </div><noinclude>[[Category:Notice templates]]</noinclude> c6727bf6179a36a5413ed93f232fd0e2f7180256 Template:Mbox 10 835 1853 1628 2023-07-15T17:02:08Z Richard Robin 2 (不知道为啥从MediaWiki搬运的模板在这里显示异常就先这么用吧估计会用别的模板来代替) wikitext text/x-wiki {| cellspacing="0" width="80%" cellpadding="0" style="padding:5px; margin: 0 auto; border: 1px solid #aaa |- | style="font-size: 100%" | |- | {{#invoke:Message box|mbox}} |}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 9ae3093ee337386913adef22fcb3f477b3d71ef8 Template:需要翻译 10 931 1854 2023-07-15T17:18:28Z Richard Robin 2 创建页面,内容为“{{mbox | style = "padding:5px; margin: 0 auto; border: 1px solid #aaa; background-color: #cfc" | text = '''<big><big>这个页面的内容需要翻译。</big></big>'''<br> 我们非常欢迎各位有能力的朋友协助我们翻译这些页面,但也请各位量力而行,不要使用机翻导致翻译出来的东西无法理解。请使用本土化的语言(尤其是在中文版已经出现的专有名词)。 | type = | image = File:Profinkling.p…” wikitext text/x-wiki {{mbox | style = "padding:5px; margin: 0 auto; border: 1px solid #aaa; background-color: #cfc" | text = '''<big><big>这个页面的内容需要翻译。</big></big>'''<br> 我们非常欢迎各位有能力的朋友协助我们翻译这些页面,但也请各位量力而行,不要使用机翻导致翻译出来的东西无法理解。请使用本土化的语言(尤其是在中文版已经出现的专有名词)。 | type = | image = [[File:Profinkling.png|100px|center]] | sect = {{{1|这个页面的内容需要翻译。}}} | issue = 这个页面的内容需要翻译。 | talk = {{{talk|这个页面的内容需要翻译。}}} | fix = | date = {{{date|这个页面的内容需要翻译。}}} | cat = | all = 这个页面的内容需要翻译。 }} c567371fd69aeb41aa19dc69e4919d50e7eb27af 1855 1854 2023-07-15T17:18:45Z Richard Robin 2 wikitext text/x-wiki {{mbox | text = '''<big><big>这个页面的内容需要翻译。</big></big>'''<br> 我们非常欢迎各位有能力的朋友协助我们翻译这些页面,但也请各位量力而行,不要使用机翻导致翻译出来的东西无法理解。请使用本土化的语言(尤其是在中文版已经出现的专有名词)。 | type = | image = [[File:Profinkling.png|100px|center]] | sect = {{{1|这个页面的内容需要翻译。}}} | issue = 这个页面的内容需要翻译。 | talk = {{{talk|这个页面的内容需要翻译。}}} | fix = | date = {{{date|这个页面的内容需要翻译。}}} | cat = | all = 这个页面的内容需要翻译。 }} 8b7c724d1c1df54349c6d0e5097d3b412485f544 Template:欢迎来到海底小纵队沙盒!为了方便他人进行编辑练习,请不要删除本说明模板。 10 933 1857 2023-07-15T17:39:24Z Richard Robin 2 创建页面,内容为“{{header | title = <center>欢迎使用海底小纵队维基专用沙盒!</center> | shortcut = | notes = 沙盒是用于练习页面编辑技巧的测试页面。您可在此随意地进行编辑的练习。完成编辑后,可点击“显示预览”按钮预览内容,也可点击“发布更改”按钮保存内容。就像在沙滩上所写的文字涨潮时就会消失,同样沙盒中所写的内容,随时可能被清空,不会有任何…” wikitext text/x-wiki {{header | title = <center>欢迎使用海底小纵队维基专用沙盒!</center> | shortcut = | notes = 沙盒是用于练习页面编辑技巧的测试页面。您可在此随意地进行编辑的练习。完成编辑后,可点击“显示预览”按钮预览内容,也可点击“发布更改”按钮保存内容。就像在沙滩上所写的文字涨潮时就会消失,同样沙盒中所写的内容,随时可能被清空,不会有任何预先通知(但曾保存的内容仍会永久存留在页面的历史记录中)。请注意:<br> * 请不要在公用的沙盒撰写条目或存放其他有价值的内容; * 请不要在沙盒进行广告宣传或刷编辑次数,否则可能会被封禁; * 请不要在此沙盒中编写任何违反所在地法律法规的内容; * 请不要编写有侵犯他人版权、攻击性、诽谤中伤他人或他人隐私的内容; * 为了方便他人进行编辑练习,请不要在使用沙盒时将本说明删除。 网站由于建立时间较短,所以目前先写到这里,可能该说明会有一些增补或删减,但该沙盒的基本说明和其他任何百科的沙盒说明主基调相同。 | topbarhex = 083388 | bodyhex = acc8ff | titlecolor = | bodycolor = }} 7fadeb72c70365c141e7646639e94b2dca82bca9 海底小纵队维基:沙盒 4 934 1858 2023-07-15T17:39:48Z Richard Robin 2 创建页面,内容为“{{欢迎来到海底小纵队沙盒!为了方便他人进行编辑练习,请不要删除本说明模板。}}” wikitext text/x-wiki {{欢迎来到海底小纵队沙盒!为了方便他人进行编辑练习,请不要删除本说明模板。}} bde9ed5d6a8efbd78055d3a15b40765a924bd6f3 Module:Category handler 828 935 1860 1859 2023-07-15T17:43:41Z Richard Robin 2 已从[[:wikipedia:Module:Category_handler]]导入1个版本 Scribunto text/plain -------------------------------------------------------------------------------- -- -- -- CATEGORY HANDLER -- -- -- -- This module implements the {{category handler}} template in Lua, -- -- with a few improvements: all namespaces and all namespace aliases -- -- are supported, and namespace names are detected automatically for -- -- the local wiki. This module requires [[Module:Namespace detect]] -- -- and [[Module:Yesno]] to be available on the local wiki. It can be -- -- configured for different wikis by altering the values in -- -- [[Module:Category handler/config]], and pages can be blacklisted -- -- from categorisation by using [[Module:Category handler/blacklist]]. -- -- -- -------------------------------------------------------------------------------- -- Load required modules local yesno = require('Module:Yesno') -- Lazily load things we don't always need local mShared, mappings local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function trimWhitespace(s, removeBlanks) if type(s) ~= 'string' then return s end s = s:match('^%s*(.-)%s*$') if removeBlanks then if s ~= '' then return s else return nil end else return s end end -------------------------------------------------------------------------------- -- CategoryHandler class -------------------------------------------------------------------------------- local CategoryHandler = {} CategoryHandler.__index = CategoryHandler function CategoryHandler.new(data, args) local obj = setmetatable({ _data = data, _args = args }, CategoryHandler) -- Set the title object do local pagename = obj:parameter('demopage') local success, titleObj if pagename then success, titleObj = pcall(mw.title.new, pagename) end if success and titleObj then obj.title = titleObj if titleObj == mw.title.getCurrentTitle() then obj._usesCurrentTitle = true end else obj.title = mw.title.getCurrentTitle() obj._usesCurrentTitle = true end end -- Set suppression parameter values for _, key in ipairs{'nocat', 'categories'} do local value = obj:parameter(key) value = trimWhitespace(value, true) obj['_' .. key] = yesno(value) end do local subpage = obj:parameter('subpage') local category2 = obj:parameter('category2') if type(subpage) == 'string' then subpage = mw.ustring.lower(subpage) end if type(category2) == 'string' then subpage = mw.ustring.lower(category2) end obj._subpage = trimWhitespace(subpage, true) obj._category2 = trimWhitespace(category2) -- don't remove blank values end return obj end function CategoryHandler:parameter(key) local parameterNames = self._data.parameters[key] local pntype = type(parameterNames) if pntype == 'string' or pntype == 'number' then return self._args[parameterNames] elseif pntype == 'table' then for _, name in ipairs(parameterNames) do local value = self._args[name] if value ~= nil then return value end end return nil else error(string.format( 'invalid config key "%s"', tostring(key) ), 2) end end function CategoryHandler:isSuppressedByArguments() return -- See if a category suppression argument has been set. self._nocat == true or self._categories == false or ( self._category2 and self._category2 ~= self._data.category2Yes and self._category2 ~= self._data.category2Negative ) -- Check whether we are on a subpage, and see if categories are -- suppressed based on our subpage status. or self._subpage == self._data.subpageNo and self.title.isSubpage or self._subpage == self._data.subpageOnly and not self.title.isSubpage end function CategoryHandler:shouldSkipBlacklistCheck() -- Check whether the category suppression arguments indicate we -- should skip the blacklist check. return self._nocat == false or self._categories == true or self._category2 == self._data.category2Yes end function CategoryHandler:matchesBlacklist() if self._usesCurrentTitle then return self._data.currentTitleMatchesBlacklist else mShared = mShared or require('Module:Category handler/shared') return mShared.matchesBlacklist( self.title.prefixedText, mw.loadData('Module:Category handler/blacklist') ) end end function CategoryHandler:isSuppressed() -- Find if categories are suppressed by either the arguments or by -- matching the blacklist. return self:isSuppressedByArguments() or not self:shouldSkipBlacklistCheck() and self:matchesBlacklist() end function CategoryHandler:getNamespaceParameters() if self._usesCurrentTitle then return self._data.currentTitleNamespaceParameters else if not mappings then mShared = mShared or require('Module:Category handler/shared') mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData end return mShared.getNamespaceParameters( self.title, mappings ) end end function CategoryHandler:namespaceParametersExist() -- Find whether any namespace parameters have been specified. -- We use the order "all" --> namespace params --> "other" as this is what -- the old template did. if self:parameter('all') then return true end if not mappings then mShared = mShared or require('Module:Category handler/shared') mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData end for ns, params in pairs(mappings) do for i, param in ipairs(params) do if self._args[param] then return true end end end if self:parameter('other') then return true end return false end function CategoryHandler:getCategories() local params = self:getNamespaceParameters() local nsCategory for i, param in ipairs(params) do local value = self._args[param] if value ~= nil then nsCategory = value break end end if nsCategory ~= nil or self:namespaceParametersExist() then -- Namespace parameters exist - advanced usage. if nsCategory == nil then nsCategory = self:parameter('other') end local ret = {self:parameter('all')} local numParam = tonumber(nsCategory) if numParam and numParam >= 1 and math.floor(numParam) == numParam then -- nsCategory is an integer ret[#ret + 1] = self._args[numParam] else ret[#ret + 1] = nsCategory end if #ret < 1 then return nil else return table.concat(ret) end elseif self._data.defaultNamespaces[self.title.namespace] then -- Namespace parameters don't exist, simple usage. return self._args[1] end return nil end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- Used for testing purposes. return { CategoryHandler = CategoryHandler } end function p._main(args, data) data = data or mw.loadData('Module:Category handler/data') local handler = CategoryHandler.new(data, args) if handler:isSuppressed() then return nil end return handler:getCategories() end function p.main(frame, data) data = data or mw.loadData('Module:Category handler/data') local args = require('Module:Arguments').getArgs(frame, { wrappers = data.wrappers, valueFunc = function (k, v) v = trimWhitespace(v) if type(k) == 'number' then if v ~= '' then return v else return nil end else return v end end }) return p._main(args, data) end return p b74dd63857b24904ac452429b11213f18647471f Module:Namespace detect 828 936 1862 1861 2023-07-15T17:43:43Z Richard Robin 2 已从[[:wikipedia:Module:Namespace_detect]]导入1个版本 Scribunto text/plain --[[ -------------------------------------------------------------------------------- -- -- -- NAMESPACE DETECT -- -- -- -- This module implements the {{namespace detect}} template in Lua, with a -- -- few improvements: all namespaces and all namespace aliases are supported, -- -- and namespace names are detected automatically for the local wiki. The -- -- module can also use the corresponding subject namespace value if it is -- -- used on a talk page. Parameter names can be configured for different wikis -- -- by altering the values in the "cfg" table in -- -- Module:Namespace detect/config. -- -- -- -------------------------------------------------------------------------------- --]] local data = mw.loadData('Module:Namespace detect/data') local argKeys = data.argKeys local cfg = data.cfg local mappings = data.mappings local yesno = require('Module:Yesno') local mArguments -- Lazily initialise Module:Arguments local mTableTools -- Lazily initilalise Module:TableTools local ustringLower = mw.ustring.lower local p = {} local function fetchValue(t1, t2) -- Fetches a value from the table t1 for the first key in array t2 where -- a non-nil value of t1 exists. for i, key in ipairs(t2) do local value = t1[key] if value ~= nil then return value end end return nil end local function equalsArrayValue(t, value) -- Returns true if value equals a value in the array t. Otherwise -- returns false. for i, arrayValue in ipairs(t) do if value == arrayValue then return true end end return false end function p.getPageObject(page) -- Get the page object, passing the function through pcall in case of -- errors, e.g. being over the expensive function count limit. if page then local success, pageObject = pcall(mw.title.new, page) if success then return pageObject else return nil end else return mw.title.getCurrentTitle() end end -- Provided for backward compatibility with other modules function p.getParamMappings() return mappings end local function getNamespace(args) -- This function gets the namespace name from the page object. local page = fetchValue(args, argKeys.demopage) if page == '' then page = nil end local demospace = fetchValue(args, argKeys.demospace) if demospace == '' then demospace = nil end local subjectns = fetchValue(args, argKeys.subjectns) local ret if demospace then -- Handle "demospace = main" properly. if equalsArrayValue(argKeys.main, ustringLower(demospace)) then ret = mw.site.namespaces[0].name else ret = demospace end else local pageObject = p.getPageObject(page) if pageObject then if pageObject.isTalkPage then -- Get the subject namespace if the option is set, -- otherwise use "talk". if yesno(subjectns) then ret = mw.site.namespaces[pageObject.namespace].subject.name else ret = 'talk' end else ret = pageObject.nsText end else return nil -- return nil if the page object doesn't exist. end end ret = ret:gsub('_', ' ') return ustringLower(ret) end function p._main(args) -- Check the parameters stored in the mappings table for any matches. local namespace = getNamespace(args) or 'other' -- "other" avoids nil table keys local params = mappings[namespace] or {} local ret = fetchValue(args, params) --[[ -- If there were no matches, return parameters for other namespaces. -- This happens if there was no text specified for the namespace that -- was detected or if the demospace parameter is not a valid -- namespace. Note that the parameter for the detected namespace must be -- completely absent for this to happen, not merely blank. --]] if ret == nil then ret = fetchValue(args, argKeys.other) end return ret end function p.main(frame) mArguments = require('Module:Arguments') local args = mArguments.getArgs(frame, {removeBlanks = false}) local ret = p._main(args) return ret or '' end function p.table(frame) --[[ -- Create a wikitable of all subject namespace parameters, for -- documentation purposes. The talk parameter is optional, in case it -- needs to be excluded in the documentation. --]] -- Load modules and initialise variables. mTableTools = require('Module:TableTools') local namespaces = mw.site.namespaces local cfg = data.cfg local useTalk = type(frame) == 'table' and type(frame.args) == 'table' and yesno(frame.args.talk) -- Whether to use the talk parameter. -- Get the header names. local function checkValue(value, default) if type(value) == 'string' then return value else return default end end local nsHeader = checkValue(cfg.wikitableNamespaceHeader, 'Namespace') local aliasesHeader = checkValue(cfg.wikitableAliasesHeader, 'Aliases') -- Put the namespaces in order. local mappingsOrdered = {} for nsname, params in pairs(mappings) do if useTalk or nsname ~= 'talk' then local nsid = namespaces[nsname].id -- Add 1, as the array must start with 1; nsid 0 would be lost otherwise. nsid = nsid + 1 mappingsOrdered[nsid] = params end end mappingsOrdered = mTableTools.compressSparseArray(mappingsOrdered) -- Build the table. local ret = '{| class="wikitable"' .. '\n|-' .. '\n! ' .. nsHeader .. '\n! ' .. aliasesHeader for i, params in ipairs(mappingsOrdered) do for j, param in ipairs(params) do if j == 1 then ret = ret .. '\n|-' .. '\n| <code>' .. param .. '</code>' .. '\n| ' elseif j == 2 then ret = ret .. '<code>' .. param .. '</code>' else ret = ret .. ', <code>' .. param .. '</code>' end end end ret = ret .. '\n|-' .. '\n|}' return ret end return p a4757000273064f151f0f22dc0e139092e5ff443 Module:Namespace detect/data 828 937 1864 1863 2023-07-15T17:43:43Z Richard Robin 2 已从[[:wikipedia:Module:Namespace_detect/data]]导入1个版本 Scribunto text/plain -------------------------------------------------------------------------------- -- Namespace detect data -- -- This module holds data for [[Module:Namespace detect]] to be loaded per -- -- page, rather than per #invoke, for performance reasons. -- -------------------------------------------------------------------------------- local cfg = require('Module:Namespace detect/config') local function addKey(t, key, defaultKey) if key ~= defaultKey then t[#t + 1] = key end end -- Get a table of parameters to query for each default parameter name. -- This allows wikis to customise parameter names in the cfg table while -- ensuring that default parameter names will always work. The cfg table -- values can be added as a string, or as an array of strings. local defaultKeys = { 'main', 'talk', 'other', 'subjectns', 'demospace', 'demopage' } local argKeys = {} for i, defaultKey in ipairs(defaultKeys) do argKeys[defaultKey] = {defaultKey} end for defaultKey, t in pairs(argKeys) do local cfgValue = cfg[defaultKey] local cfgValueType = type(cfgValue) if cfgValueType == 'string' then addKey(t, cfgValue, defaultKey) elseif cfgValueType == 'table' then for i, key in ipairs(cfgValue) do addKey(t, key, defaultKey) end end cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more. end local function getParamMappings() --[[ -- Returns a table of how parameter names map to namespace names. The keys -- are the actual namespace names, in lower case, and the values are the -- possible parameter names for that namespace, also in lower case. The -- table entries are structured like this: -- { -- [''] = {'main'}, -- ['wikipedia'] = {'wikipedia', 'project', 'wp'}, -- ... -- } --]] local mappings = {} local mainNsName = mw.site.subjectNamespaces[0].name mainNsName = mw.ustring.lower(mainNsName) mappings[mainNsName] = mw.clone(argKeys.main) mappings['talk'] = mw.clone(argKeys.talk) for nsid, ns in pairs(mw.site.subjectNamespaces) do if nsid ~= 0 then -- Exclude main namespace. local nsname = mw.ustring.lower(ns.name) local canonicalName = mw.ustring.lower(ns.canonicalName) mappings[nsname] = {nsname} if canonicalName ~= nsname then table.insert(mappings[nsname], canonicalName) end for _, alias in ipairs(ns.aliases) do table.insert(mappings[nsname], mw.ustring.lower(alias)) end end end return mappings end return { argKeys = argKeys, cfg = cfg, mappings = getParamMappings() } d224f42a258bc308ef3ad8cc8686cd7a4f47d005 Module:Namespace detect/config 828 938 1866 1865 2023-07-15T17:43:43Z Richard Robin 2 已从[[:wikipedia:Module:Namespace_detect/config]]导入1个版本 Scribunto text/plain -------------------------------------------------------------------------------- -- Namespace detect configuration data -- -- -- -- This module stores configuration data for Module:Namespace detect. Here -- -- you can localise the module to your wiki's language. -- -- -- -- To activate a configuration item, you need to uncomment it. This means -- -- that you need to remove the text "-- " at the start of the line. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Parameter names -- -- These configuration items specify custom parameter names. Values added -- -- here will work in addition to the default English parameter names. -- -- To add one extra name, you can use this format: -- -- -- -- cfg.foo = 'parameter name' -- -- -- -- To add multiple names, you can use this format: -- -- -- -- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'} -- -------------------------------------------------------------------------------- ---- This parameter displays content for the main namespace: -- cfg.main = 'main' ---- This parameter displays in talk namespaces: -- cfg.talk = 'talk' ---- This parameter displays content for "other" namespaces (namespaces for which ---- parameters have not been specified): -- cfg.other = 'other' ---- This parameter makes talk pages behave as though they are the corresponding ---- subject namespace. Note that this parameter is used with [[Module:Yesno]]. ---- Edit that module to change the default values of "yes", "no", etc. -- cfg.subjectns = 'subjectns' ---- This parameter sets a demonstration namespace: -- cfg.demospace = 'demospace' ---- This parameter sets a specific page to compare: cfg.demopage = 'page' -------------------------------------------------------------------------------- -- Table configuration -- -- These configuration items allow customisation of the "table" function, -- -- used to generate a table of possible parameters in the module -- -- documentation. -- -------------------------------------------------------------------------------- ---- The header for the namespace column in the wikitable containing the list of ---- possible subject-space parameters. -- cfg.wikitableNamespaceHeader = 'Namespace' ---- The header for the wikitable containing the list of possible subject-space ---- parameters. -- cfg.wikitableAliasesHeader = 'Aliases' -------------------------------------------------------------------------------- -- End of configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line. 0e4ff08d13c4b664d66b32c232deb129b77c1a56 Module:Category handler/data 828 939 1868 1867 2023-07-15T17:43:45Z Richard Robin 2 已从[[:wikipedia:Module:Category_handler/data]]导入1个版本 Scribunto text/plain -- This module assembles data to be passed to [[Module:Category handler]] using -- mw.loadData. This includes the configuration data and whether the current -- page matches the title blacklist. local data = require('Module:Category handler/config') local mShared = require('Module:Category handler/shared') local blacklist = require('Module:Category handler/blacklist') local title = mw.title.getCurrentTitle() data.currentTitleMatchesBlacklist = mShared.matchesBlacklist( title.prefixedText, blacklist ) data.currentTitleNamespaceParameters = mShared.getNamespaceParameters( title, mShared.getParamMappings() ) return data abbc68048ff698e88dda06b64ecf384bbf583120 Module:Category handler/config 828 940 1870 1869 2023-07-15T17:43:45Z Richard Robin 2 已从[[:wikipedia:Module:Category_handler/config]]导入1个版本 Scribunto text/plain -------------------------------------------------------------------------------- -- [[Module:Category handler]] configuration data -- -- Language-specific parameter names and values can be set here. -- -- For blacklist config, see [[Module:Category handler/blacklist]]. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Start configuration data -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Parameter names -- -- These configuration items specify custom parameter names. -- -- To add one extra name, you can use this format: -- -- -- -- foo = 'parameter name', -- -- -- -- To add multiple names, you can use this format: -- -- -- -- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, -- -------------------------------------------------------------------------------- cfg.parameters = { -- The nocat and categories parameter suppress -- categorisation. They are used with Module:Yesno, and work as follows: -- -- cfg.nocat: -- Result of yesno() Effect -- true Categorisation is suppressed -- false Categorisation is allowed, and -- the blacklist check is skipped -- nil Categorisation is allowed -- -- cfg.categories: -- Result of yesno() Effect -- true Categorisation is allowed, and -- the blacklist check is skipped -- false Categorisation is suppressed -- nil Categorisation is allowed nocat = 'nocat', categories = 'categories', -- The parameter name for the legacy "category2" parameter. This skips the -- blacklist if set to the cfg.category2Yes value, and suppresses -- categorisation if present but equal to anything other than -- cfg.category2Yes or cfg.category2Negative. category2 = 'category2', -- cfg.subpage is the parameter name to specify how to behave on subpages. subpage = 'subpage', -- The parameter for data to return in all namespaces. all = 'all', -- The parameter name for data to return if no data is specified for the -- namespace that is detected. other = 'other', -- The parameter name used to specify a page other than the current page; -- used for testing and demonstration. demopage = 'page', } -------------------------------------------------------------------------------- -- Parameter values -- -- These are set values that can be used with certain parameters. Only one -- -- value can be specified, like this: -- -- -- -- cfg.foo = 'value name' -- -- -------------------------------------------------------------------------------- -- The following settings are used with the cfg.category2 parameter. Setting -- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2 -- is present but equal to anything other than cfg.category2Yes or -- cfg.category2Negative then it supresses cateogrisation. cfg.category2Yes = 'yes' cfg.category2Negative = '¬' -- The following settings are used with the cfg.subpage parameter. -- cfg.subpageNo is the value to specify to not categorise on subpages; -- cfg.subpageOnly is the value to specify to only categorise on subpages. cfg.subpageNo = 'no' cfg.subpageOnly = 'only' -------------------------------------------------------------------------------- -- Default namespaces -- -- This is a table of namespaces to categorise by default. The keys are the -- -- namespace numbers. -- -------------------------------------------------------------------------------- cfg.defaultNamespaces = { [ 0] = true, -- main [ 6] = true, -- file [ 12] = true, -- help [ 14] = true, -- category [100] = true, -- portal [108] = true, -- book } -------------------------------------------------------------------------------- -- Wrappers -- -- This is a wrapper template or a list of wrapper templates to be passed to -- -- [[Module:Arguments]]. -- -------------------------------------------------------------------------------- cfg.wrappers = 'Template:Category handler' -------------------------------------------------------------------------------- -- End configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line. 373cd107b13a5b00e6a1b7e66a749f12502c849d Module:Category handler/shared 828 941 1872 1871 2023-07-15T17:43:45Z Richard Robin 2 已从[[:wikipedia:Module:Category_handler/shared]]导入1个版本 Scribunto text/plain -- This module contains shared functions used by [[Module:Category handler]] -- and its submodules. local p = {} function p.matchesBlacklist(page, blacklist) for i, pattern in ipairs(blacklist) do local match = mw.ustring.match(page, pattern) if match then return true end end return false end function p.getParamMappings(useLoadData) local dataPage = 'Module:Namespace detect/data' if useLoadData then return mw.loadData(dataPage).mappings else return require(dataPage).mappings end end function p.getNamespaceParameters(titleObj, mappings) -- We don't use title.nsText for the namespace name because it adds -- underscores. local mappingsKey if titleObj.isTalkPage then mappingsKey = 'talk' else mappingsKey = mw.site.namespaces[titleObj.namespace].name end mappingsKey = mw.ustring.lower(mappingsKey) return mappings[mappingsKey] or {} end return p d2d5de1a031e6ce97c242cbfa8afe7a92cb9eca5 Module:Category handler/blacklist 828 942 1874 1873 2023-07-15T17:43:46Z Richard Robin 2 已从[[:wikipedia:Module:Category_handler/blacklist]]导入1个版本 Scribunto text/plain -- This module contains the blacklist used by [[Module:Category handler]]. -- Pages that match Lua patterns in this list will not be categorised unless -- categorisation is explicitly requested. return { '^Main Page$', -- don't categorise the main page. -- Don't categorise the following pages or their subpages. -- "%f[/\0]" matches if the next character is "/" or the end of the string. '^Wikipedia:Cascade%-protected items%f[/\0]', '^User:UBX%f[/\0]', -- The userbox "template" space. '^User talk:UBX%f[/\0]', -- Don't categorise subpages of these pages, but allow -- categorisation of the base page. '^Wikipedia:Template index/.*$', -- Don't categorise archives. '/[aA]rchive', "^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$", } 87469d7a9ef2a3c41b2bf04ae18f7c59a18fb855 Template:Ombox 10 943 1876 1875 2023-07-15T17:43:49Z Richard Robin 2 已从[[:wikipedia:Template:Ombox]]导入1个版本 wikitext text/x-wiki {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0e54065432d540737b9e56c4e3a8e7f74d4534ea Template:Module other 10 944 1878 1877 2023-07-15T17:43:52Z Richard Robin 2 已从[[:wikipedia:Template:Module_other]]导入1个版本 wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Module}} | module | other }} }} | module = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 503694836c1b07142e63fd35d8be69ec8bb9ffe7 Module:Transclusion count/data/C 828 945 1880 1879 2023-07-15T17:43:52Z Richard Robin 2 已从[[:wikipedia:Module:Transclusion_count/data/C]]导入1个版本 Scribunto text/plain return { ["C"] = 748000, ["C-Class"] = 43000, ["C-SPAN"] = 12000, ["C-cmn"] = 2600, ["C-pl"] = 52000, ["C."] = 3900, ["CAN"] = 20000, ["CANelec"] = 14000, ["CANelec/gain"] = 2600, ["CANelec/hold"] = 4900, ["CANelec/source"] = 7000, ["CANelec/top"] = 6300, ["CANelec/total"] = 6200, ["CAS"] = 3800, ["CBB_Standings_End"] = 14000, ["CBB_Standings_Entry"] = 14000, ["CBB_Standings_Start"] = 14000, ["CBB_Yearly_Record_End"] = 3100, ["CBB_Yearly_Record_Entry"] = 3100, ["CBB_Yearly_Record_Start"] = 3000, ["CBB_Yearly_Record_Subhead"] = 3700, ["CBB_Yearly_Record_Subtotal"] = 2900, ["CBB_roster/Footer"] = 7800, ["CBB_roster/Header"] = 7800, ["CBB_roster/Player"] = 7800, ["CBB_schedule_end"] = 11000, ["CBB_schedule_entry"] = 11000, ["CBB_schedule_start"] = 11000, ["CBB_standings_end"] = 15000, ["CBB_standings_entry"] = 15000, ["CBB_standings_start"] = 15000, ["CBB_yearly_record_end"] = 4100, ["CBB_yearly_record_end/legend"] = 3600, ["CBB_yearly_record_entry"] = 4100, ["CBB_yearly_record_start"] = 4000, ["CBB_yearly_record_subhead"] = 3700, ["CBB_yearly_record_subtotal"] = 3800, ["CBSB_Standings_End"] = 4200, ["CBSB_Standings_Entry"] = 4200, ["CBSB_Standings_Start"] = 4200, ["CBSB_link"] = 3500, ["CBSB_standings_end"] = 4400, ["CBSB_standings_entry"] = 4400, ["CBSB_standings_start"] = 4400, ["CC0"] = 4000, ["CENTURY"] = 16000, ["CFB_Standings_End"] = 33000, ["CFB_Standings_Entry"] = 34000, ["CFB_Standings_Start"] = 34000, ["CFB_Yearly_Record_End"] = 6700, ["CFB_Yearly_Record_End/legend"] = 2300, ["CFB_Yearly_Record_Entry"] = 6700, ["CFB_Yearly_Record_Start"] = 6700, ["CFB_Yearly_Record_Subhead"] = 6700, ["CFB_Yearly_Record_Subtotal"] = 6600, ["CFB_schedule"] = 26000, ["CFB_schedule_entry"] = 19000, ["CFB_standings_end"] = 34000, ["CFB_standings_entry"] = 34000, ["CFB_standings_start"] = 34000, ["CFL_Year"] = 5600, ["CGF_year"] = 2600, ["CHE"] = 10000, ["CHI"] = 2700, ["CHL"] = 3600, ["CHN"] = 11000, ["CN"] = 3400, ["CO2"] = 3200, ["COI"] = 14000, ["COIUL"] = 128000, ["COI_editnotice"] = 6600, ["COL"] = 4900, ["COLON"] = 13000, ["CRI"] = 2200, ["CRO"] = 5200, ["CSK"] = 2800, ["CSS_image_crop"] = 4500, ["CUB"] = 3700, ["CURRENTDATE"] = 3600, ["CURRENTMINUTE"] = 2500, ["CYP"] = 2000, ["CZE"] = 15000, ["Calendar"] = 2400, ["California/color"] = 11000, ["Call_sign_disambiguation"] = 3000, ["Campaignbox"] = 23000, ["CanProvName"] = 14000, ["CanadaByProvinceCatNav"] = 9800, ["CanadaProvinceThe"] = 4000, ["Canadian_English"] = 6800, ["Canadian_Parliament_links"] = 5100, ["Canadian_election_result"] = 14000, ["Canadian_election_result/gain"] = 2600, ["Canadian_election_result/hold"] = 5000, ["Canadian_election_result/source"] = 8100, ["Canadian_election_result/top"] = 13000, ["Canadian_election_result/top/ElectionYearTest"] = 5700, ["Canadian_election_result/total"] = 11000, ["Canadian_party_colour"] = 8100, ["Canadian_party_colour/colour"] = 18000, ["Canadian_party_colour/colour/default"] = 18000, ["Canadian_party_colour/name"] = 15000, ["Canadian_party_colour/name/default"] = 6900, ["Canned_search"] = 5400, ["Cardinal_to_word"] = 6400, ["Cascite"] = 15000, ["Caselaw_source"] = 4000, ["Cassini-Ehess"] = 2600, ["Cast_listing"] = 15000, ["Castlist"] = 2300, ["Cat"] = 344000, ["CatAutoTOC"] = 656000, ["CatAutoTOC/core"] = 655000, ["CatRel"] = 3800, ["CatTrack"] = 3100, ["Cat_class"] = 6600, ["Cat_in_use"] = 50000, ["Cat_main"] = 198000, ["Cat_more"] = 101000, ["Cat_more_if_exists"] = 41000, ["Cat_see_also"] = 3500, ["Catalog_lookup_link"] = 514000, ["Category-Class"] = 14000, ["Category-inline"] = 8900, ["Category_TOC"] = 72000, ["Category_TOC/tracking"] = 72000, ["Category_U.S._State_elections_by_year"] = 7300, ["Category_U.S._State_elections_by_year/core"] = 7300, ["Category_class"] = 35000, ["Category_class/column"] = 35000, ["Category_class/second_row_column"] = 35000, ["Category_described_in_year"] = 5700, ["Category_diffuse"] = 8000, ["Category_disambiguation"] = 2400, ["Category_disambiguation/category_link"] = 2400, ["Category_explanation"] = 235000, ["Category_handler"] = 3290000, ["Category_ifexist"] = 5000, ["Category_importance"] = 10000, ["Category_importance/column"] = 10000, ["Category_importance/second_row_column"] = 10000, ["Category_link"] = 132000, ["Category_link_with_count"] = 6800, ["Category_more"] = 110000, ["Category_more_if_exists"] = 41000, ["Category_ordered_by_date"] = 11000, ["Category_other"] = 892000, ["Category_redirect"] = 108000, ["Category_see_also"] = 39000, ["Category_see_also/Category_pair_check"] = 39000, ["Category_see_also_if_exists"] = 72000, ["Category_see_also_if_exists_2"] = 88000, ["Category_title"] = 2400, ["Catexp"] = 7800, ["CathEncy"] = 2300, ["Catholic"] = 4100, ["Catholic_Encyclopedia"] = 5100, ["Catmain"] = 27000, ["Catmore"] = 9400, ["Cbb_link"] = 8600, ["Cbignore"] = 100000, ["Cbsb_link"] = 2100, ["Cc-by-2.5"] = 3900, ["Cc-by-3.0"] = 8700, ["Cc-by-sa-2.5"] = 2600, ["Cc-by-sa-2.5,2.0,1.0"] = 2600, ["Cc-by-sa-3.0"] = 26000, ["Cc-by-sa-3.0,2.5,2.0,1.0"] = 2300, ["Cc-by-sa-3.0-migrated"] = 24000, ["Cc-by-sa-4.0"] = 10000, ["Cc-zero"] = 3900, ["CensusAU"] = 9300, ["Census_2016_AUS"] = 7100, ["Cent"] = 5700, ["Center"] = 287000, ["Centralized_discussion"] = 6000, ["Centralized_discussion/core"] = 6000, ["Centralized_discussion/styles.css"] = 6000, ["Centre"] = 3200, ["Century"] = 2100, ["Century_name_from_decade"] = 2400, ["Century_name_from_decade_or_year"] = 77000, ["Century_name_from_title_decade"] = 7600, ["Century_name_from_title_year"] = 7500, ["Certification_Cite/Title"] = 30000, ["Certification_Cite/URL"] = 33000, ["Certification_Cite/archivedate"] = 6000, ["Certification_Cite/archiveurl"] = 6000, ["Certification_Cite_Ref"] = 29000, ["Certification_Table_Bottom"] = 29000, ["Certification_Table_Entry"] = 30000, ["Certification_Table_Entry/Foot"] = 28000, ["Certification_Table_Entry/Foot/helper"] = 28000, ["Certification_Table_Entry/Region"] = 29000, ["Certification_Table_Entry/Sales"] = 28000, ["Certification_Table_Entry/Sales/BelgianPeriod"] = 2100, ["Certification_Table_Entry/Sales/DanishPeriod"] = 3200, ["Certification_Table_Entry/Sales/DanishPeriodHelper1"] = 3200, ["Certification_Table_Entry/Sales/DanishPeriodHelper2"] = 3200, ["Certification_Table_Entry/Sales/GermanPeriod"] = 4000, ["Certification_Table_Entry/Sales/ItalianHelper"] = 3200, ["Certification_Table_Entry/Sales/NewZealandPeriod"] = 2000, ["Certification_Table_Entry/Sales/SwedishPeriod"] = 2100, ["Certification_Table_Separator"] = 2300, ["Certification_Table_Top"] = 30000, ["Cfb_link"] = 24000, ["Cfd_result"] = 2400, ["Cfdend"] = 4000, ["Chart"] = 4600, ["Chart/end"] = 4700, ["Chart/start"] = 4600, ["Chart_bottom"] = 3500, ["Chart_top"] = 3500, ["Check_completeness_of_transclusions"] = 7300, ["Check_talk"] = 30000, ["Check_talk_wp"] = 1370000, ["Check_winner_by_scores"] = 13000, ["CheckedSockpuppet"] = 7200, ["Checked_sockpuppet"] = 18000, ["Checkedsockpuppet"] = 5300, ["Checkip"] = 13000, ["Checkuser"] = 75000, ["Checkuserblock-account"] = 16000, ["Chem"] = 5800, ["Chem/atom"] = 5800, ["Chem/link"] = 5800, ["Chem2"] = 4700, ["Chem_molar_mass"] = 18000, ["Chem_molar_mass/format"] = 18000, ["Chembox"] = 14000, ["Chembox/styles.css"] = 14000, ["Chembox_3DMet"] = 14000, ["Chembox_3DMet/format"] = 14000, ["Chembox_AllOtherNames"] = 13000, ["Chembox_AllOtherNames/format"] = 13000, ["Chembox_Appearance"] = 6100, ["Chembox_BoilingPt"] = 3800, ["Chembox_CASNo"] = 14000, ["Chembox_CASNo/format"] = 14000, ["Chembox_CalcTemperatures"] = 6800, ["Chembox_ChEBI"] = 14000, ["Chembox_ChEBI/format"] = 14000, ["Chembox_ChEMBL"] = 14000, ["Chembox_ChEMBL/format"] = 14000, ["Chembox_ChemSpiderID"] = 14000, ["Chembox_ChemSpiderID/format"] = 14000, ["Chembox_CompTox"] = 14000, ["Chembox_CompTox/format"] = 14000, ["Chembox_Datapage_check"] = 14000, ["Chembox_Density"] = 4900, ["Chembox_DrugBank"] = 14000, ["Chembox_DrugBank/format"] = 14000, ["Chembox_ECHA"] = 7600, ["Chembox_ECNumber"] = 14000, ["Chembox_ECNumber/format"] = 14000, ["Chembox_Elements"] = 14000, ["Chembox_Elements/molecular_formula"] = 18000, ["Chembox_Footer"] = 14000, ["Chembox_Footer/tracking"] = 14000, ["Chembox_GHS_(set)"] = 3400, ["Chembox_Hazards"] = 11000, ["Chembox_IUPHAR_ligand"] = 14000, ["Chembox_IUPHAR_ligand/format"] = 14000, ["Chembox_Identifiers"] = 14000, ["Chembox_InChI"] = 12000, ["Chembox_InChI/format"] = 12000, ["Chembox_Indexlist"] = 14000, ["Chembox_Jmol"] = 14000, ["Chembox_Jmol/format"] = 14000, ["Chembox_KEGG"] = 14000, ["Chembox_KEGG/format"] = 14000, ["Chembox_MeltingPt"] = 5800, ["Chembox_Properties"] = 14000, ["Chembox_PubChem"] = 14000, ["Chembox_PubChem/format"] = 14000, ["Chembox_RTECS"] = 14000, ["Chembox_RTECS/format"] = 14000, ["Chembox_Related"] = 3300, ["Chembox_SMILES"] = 13000, ["Chembox_SMILES/format"] = 13000, ["Chembox_SolubilityInWater"] = 3900, ["Chembox_Structure"] = 2100, ["Chembox_UNII"] = 14000, ["Chembox_UNII/format"] = 14000, ["Chembox_headerbar"] = 14000, ["Chembox_image"] = 13000, ["Chembox_image_cell"] = 12000, ["Chembox_image_sbs"] = 13000, ["Chembox_parametercheck"] = 13000, ["Chembox_setDatarow"] = 4500, ["Chembox_setHeader"] = 4500, ["Chembox_templatePar/formatPreviewMessage"] = 14000, ["Chembox_verification"] = 7100, ["Chemicals"] = 7400, ["Chemistry"] = 3100, ["Chemspidercite"] = 11000, ["Chessgames_player"] = 3600, ["Chinese"] = 7300, ["Chr"] = 9100, ["ChristianityWikiProject"] = 5800, ["Circa"] = 69000, ["Circular_reference"] = 4100, ["Citation"] = 401000, ["Citation/make_link"] = 6000, ["Citation/styles.css"] = 46000, ["Citation_needed"] = 541000, ["Citation_needed_span"] = 3500, ["Citation_style"] = 4200, ["Cite_AV_media"] = 42000, ["Cite_AV_media_notes"] = 26000, ["Cite_Appletons'"] = 2400, ["Cite_Australian_Dictionary_of_Biography"] = 3300, ["Cite_Catholic_Encyclopedia"] = 8100, ["Cite_Colledge2006"] = 3100, ["Cite_DCB"] = 2800, ["Cite_DNB"] = 18000, ["Cite_EB1911"] = 25000, ["Cite_GNIS"] = 2300, ["Cite_Gaia_DR2"] = 2100, ["Cite_Jewish_Encyclopedia"] = 2900, ["Cite_NIE"] = 3600, ["Cite_NSW_Parliament"] = 3300, ["Cite_NSW_SHR"] = 2600, ["Cite_ODNB"] = 17000, ["Cite_Q"] = 43000, ["Cite_QHR"] = 3000, ["Cite_QPN"] = 4000, ["Cite_Rowlett"] = 2500, ["Cite_Russian_law"] = 7800, ["Cite_Ryan"] = 3200, ["Cite_Sports-Reference"] = 54000, ["Cite_USGov"] = 24000, ["Cite_WoRMS"] = 5400, ["Cite_act"] = 2700, ["Cite_arXiv"] = 5000, ["Cite_bcgnis"] = 3100, ["Cite_book"] = 1580000, ["Cite_certification"] = 33000, ["Cite_cgndb"] = 3200, ["Cite_comic"] = 2000, ["Cite_conference"] = 16000, ["Cite_court"] = 5300, ["Cite_court/styles.css"] = 5300, ["Cite_dictionary"] = 3700, ["Cite_document"] = 5900, ["Cite_encyclopedia"] = 201000, ["Cite_episode"] = 17000, ["Cite_gnis"] = 34000, ["Cite_interview"] = 7700, ["Cite_iucn"] = 58000, ["Cite_journal"] = 952000, ["Cite_magazine"] = 264000, ["Cite_manual"] = 2000, ["Cite_map"] = 38000, ["Cite_news"] = 1500000, ["Cite_newspaper_The_Times"] = 6500, ["Cite_patent"] = 5400, ["Cite_patent/authors"] = 4400, ["Cite_patent/core"] = 5800, ["Cite_peakbagger"] = 4500, ["Cite_podcast"] = 3700, ["Cite_press_release"] = 64000, ["Cite_report"] = 35000, ["Cite_rowlett"] = 2500, ["Cite_simbad"] = 4500, ["Cite_sports-reference"] = 59000, ["Cite_thesis"] = 31000, ["Cite_tweet"] = 35000, ["Cite_video"] = 12000, ["Cite_video_game"] = 3100, ["Cite_web"] = 4540000, ["Cite_wikisource"] = 5500, ["Cite_wikisource/make_link"] = 58000, ["Civil_navigation"] = 2700, ["Cl"] = 129000, ["Clade"] = 7500, ["Clade/styles.css"] = 7500, ["Clarify"] = 40000, ["Class"] = 2940000, ["Class/colour"] = 2200000, ["Class/icon"] = 23000, ["Class_mask"] = 8570000, ["Class_mask/b"] = 294000, ["Classical"] = 6900, ["Classicon"] = 4700, ["Clc"] = 5900, ["Cleanup"] = 10000, ["Cleanup_bare_URLs"] = 29000, ["Cleanup_reorganize"] = 2500, ["Cleanup_rewrite"] = 5800, ["Clear"] = 2930000, ["Clear-left"] = 16000, ["Clear_left"] = 30000, ["Clear_right"] = 2900, ["Clerk-Note"] = 9800, ["Clerknote"] = 7400, ["Clickable_button"] = 16000, ["Clickable_button_2"] = 954000, ["Closed_access"] = 4400, ["Closed_rfc_top"] = 2200, ["Clr"] = 3700, ["Clubplayerscat"] = 8400, ["Cmbox"] = 417000, ["Cn"] = 92000, ["Cnote2"] = 2200, ["Cnote2_Begin"] = 2300, ["Cnote2_End"] = 2300, ["Coat_of_arms"] = 5200, ["Cob"] = 12000, ["Code"] = 50000, ["Col-1-of-2"] = 2400, ["Col-2"] = 170000, ["Col-2-of-2"] = 2300, ["Col-3"] = 9900, ["Col-4"] = 3500, ["Col-begin"] = 212000, ["Col-break"] = 210000, ["Col-end"] = 210000, ["Col-float"] = 2700, ["Col-float-break"] = 2600, ["Col-float-end"] = 2600, ["Col-float/styles.css"] = 2700, ["Col-start"] = 20000, ["Colbegin"] = 21000, ["Colend"] = 24000, ["Collapse"] = 9600, ["Collapse_bottom"] = 51000, ["Collapse_top"] = 51000, ["Collapsebottom"] = 3800, ["Collapsetop"] = 3800, ["Collapsible_list"] = 53000, ["Collapsible_option"] = 134000, ["College"] = 8800, ["CollegePrimaryHeader"] = 5800, ["CollegePrimaryStyle"] = 96000, ["CollegeSecondaryStyle"] = 3400, ["College_Athlete_Recruit_End"] = 2800, ["College_Athlete_Recruit_Entry"] = 3000, ["College_Athlete_Recruit_Start"] = 2900, ["College_athlete_recruit_end"] = 4000, ["College_athlete_recruit_entry"] = 4100, ["College_athlete_recruit_start"] = 4100, ["College_color_list"] = 3900, ["Colon"] = 18000, ["Color"] = 467000, ["Color_box"] = 73000, ["Colorbox"] = 3600, ["Colorbull"] = 4900, ["Colored_link"] = 62000, ["Colors"] = 3800, ["Colour"] = 5800, ["Coloured_link"] = 6900, ["Column"] = 2400, ["Column/styles.css"] = 2500, ["Columns-end"] = 2200, ["Columns-list"] = 98000, ["Columns-start"] = 2200, ["Comedy"] = 2500, ["Comic_Book_DB"] = 3500, ["Comicbookdb"] = 3500, ["Comics-replaceability"] = 2900, ["Comics_infobox_sec/creator_nat"] = 2800, ["Comics_infobox_sec/formcat"] = 3200, ["Comics_infobox_sec/genre"] = 3900, ["Comics_infobox_sec/genrecat"] = 3600, ["Comics_infobox_sec/styles.css"] = 8100, ["Comicsproj"] = 28000, ["Comma_separated_entries"] = 425000, ["Comma_separated_values"] = 44000, ["Comment"] = 5100, ["Committed_identity"] = 3000, ["Committed_identity/styles.css"] = 3000, ["Commons"] = 66000, ["Commons-inline"] = 20000, ["Commons_cat"] = 48000, ["Commons_category"] = 843000, ["Commons_category-inline"] = 146000, ["Commons_category_inline"] = 6000, ["Commonscat"] = 66000, ["Commonscat-inline"] = 18000, ["Commonscat_inline"] = 2400, ["Commonscatinline"] = 6500, ["Compact_TOC"] = 6900, ["Compact_ToC"] = 4900, ["Compare"] = 5100, ["Compare_image_with_Wikidata"] = 10000, ["Composition_bar"] = 10000, ["Confirmed"] = 16000, ["Confused"] = 2800, ["Confusing"] = 2300, ["CongBio"] = 9700, ["CongLinks"] = 4500, ["Connected_contributor"] = 17000, ["Connected_contributor_(paid)"] = 6800, ["Constellation_navbox"] = 6700, ["Container"] = 11000, ["Container_cat"] = 7500, ["Container_category"] = 42000, ["Containercat"] = 2600, ["Contains_special_characters"] = 4000, ["Contains_special_characters/core"] = 4000, ["Contains_special_characters/styles.css"] = 4000, ["Content_category"] = 7600, ["Contentious_topics/list"] = 13000, ["Contentious_topics/page_restriction_editnotice_base"] = 2400, ["Contentious_topics/page_restriction_talk_notice_base"] = 3600, ["Contentious_topics/talk_notice"] = 6500, ["Context"] = 2700, ["Continent2continental"] = 16000, ["Continent_adjective_to_noun"] = 2200, ["Controversial"] = 3200, ["Convert"] = 1170000, ["Convinfobox"] = 204000, ["Convinfobox/2"] = 17000, ["Convinfobox/3"] = 119000, ["Convinfobox/pri2"] = 63000, ["Convinfobox/prisec2"] = 3000, ["Convinfobox/prisec3"] = 25000, ["Convinfobox/sec2"] = 9200, ["Coord"] = 1330000, ["Coord_missing"] = 96000, ["Coord_missing/CheckCat"] = 95000, ["Coords"] = 8000, ["Copied"] = 18000, ["Copy_edit"] = 2500, ["Copy_to_Wikimedia_Commons"] = 111000, ["Copyvios"] = 4700, ["Cospar"] = 2500, ["Cot"] = 12000, ["Count"] = 658000, ["Country2continent"] = 36000, ["Country2continental"] = 2400, ["Country2nationality"] = 341000, ["CountryPrefixThe"] = 109000, ["Country_abbreviation"] = 88000, ["Country_alias"] = 15000, ["Country_at_games_navbox"] = 2600, ["Country_at_games_navbox/below"] = 2600, ["Country_data"] = 6800, ["Country_data_AFG"] = 2200, ["Country_data_ALB"] = 6600, ["Country_data_ALG"] = 9200, ["Country_data_AND"] = 3000, ["Country_data_ANG"] = 3900, ["Country_data_ARG"] = 47000, ["Country_data_ARM"] = 7300, ["Country_data_AUS"] = 75000, ["Country_data_AUT"] = 45000, ["Country_data_AZE"] = 9100, ["Country_data_Afghanistan"] = 12000, ["Country_data_Alaska"] = 2200, ["Country_data_Albania"] = 20000, ["Country_data_Alberta"] = 3600, ["Country_data_Algeria"] = 24000, ["Country_data_American_Samoa"] = 2900, ["Country_data_Andorra"] = 7900, ["Country_data_Angola"] = 11000, ["Country_data_Anguilla"] = 2500, ["Country_data_Antigua_and_Barbuda"] = 6000, ["Country_data_Apulia"] = 7900, ["Country_data_Argentina"] = 80000, ["Country_data_Arizona"] = 2300, ["Country_data_Arkansas"] = 2100, ["Country_data_Armenia"] = 22000, ["Country_data_Aruba"] = 3600, ["Country_data_Australia"] = 125000, ["Country_data_Austria"] = 78000, ["Country_data_Azerbaijan"] = 27000, ["Country_data_BAH"] = 3800, ["Country_data_BAN"] = 3800, ["Country_data_BAR"] = 2400, ["Country_data_BEL"] = 51000, ["Country_data_BER"] = 2300, ["Country_data_BHR"] = 4500, ["Country_data_BIH"] = 13000, ["Country_data_BLR"] = 24000, ["Country_data_BOL"] = 5700, ["Country_data_BOT"] = 2300, ["Country_data_BRA"] = 57000, ["Country_data_BUL"] = 26000, ["Country_data_Bahamas"] = 9600, ["Country_data_Bahrain"] = 12000, ["Country_data_Bangladesh"] = 18000, ["Country_data_Barbados"] = 8000, ["Country_data_Belarus"] = 43000, ["Country_data_Belgium"] = 88000, ["Country_data_Belize"] = 5200, ["Country_data_Benin"] = 7300, ["Country_data_Bermuda"] = 5700, ["Country_data_Bhutan"] = 4700, ["Country_data_Bolivia"] = 14000, ["Country_data_Bosnia_and_Herzegovina"] = 29000, ["Country_data_Botswana"] = 9100, ["Country_data_Brazil"] = 101000, ["Country_data_British_Columbia"] = 3400, ["Country_data_British_Raj"] = 2200, ["Country_data_British_Virgin_Islands"] = 3300, ["Country_data_Brunei"] = 6200, ["Country_data_Bulgaria"] = 52000, ["Country_data_Burkina_Faso"] = 10000, ["Country_data_Burma"] = 2700, ["Country_data_Burundi"] = 6000, ["Country_data_CAM"] = 2100, ["Country_data_CAN"] = 58000, ["Country_data_CGO"] = 2400, ["Country_data_CHE"] = 4700, ["Country_data_CHI"] = 17000, ["Country_data_CHL"] = 2100, ["Country_data_CHN"] = 41000, ["Country_data_CIV"] = 8000, ["Country_data_CMR"] = 8600, ["Country_data_COD"] = 3200, ["Country_data_COL"] = 25000, ["Country_data_CPV"] = 2000, ["Country_data_CRC"] = 6600, ["Country_data_CRO"] = 33000, ["Country_data_CUB"] = 9900, ["Country_data_CYP"] = 9000, ["Country_data_CZE"] = 46000, ["Country_data_California"] = 5900, ["Country_data_Cambodia"] = 8800, ["Country_data_Cameroon"] = 18000, ["Country_data_Canada"] = 121000, ["Country_data_Cape_Verde"] = 6300, ["Country_data_Castile_and_León"] = 2000, ["Country_data_Catalonia"] = 3100, ["Country_data_Cayman_Islands"] = 4100, ["Country_data_Central_African_Republic"] = 5100, ["Country_data_Chad"] = 5500, ["Country_data_Chile"] = 40000, ["Country_data_China"] = 83000, ["Country_data_Chinese_Taipei"] = 19000, ["Country_data_Colombia"] = 46000, ["Country_data_Colorado"] = 5700, ["Country_data_Comoros"] = 4400, ["Country_data_Confederate_States_of_America"] = 3100, ["Country_data_Connecticut"] = 3200, ["Country_data_Cook_Islands"] = 3800, ["Country_data_Costa_Rica"] = 18000, ["Country_data_Croatia"] = 56000, ["Country_data_Cuba"] = 22000, ["Country_data_Curaçao"] = 3500, ["Country_data_Cyprus"] = 22000, ["Country_data_Czech_Republic"] = 81000, ["Country_data_Czechoslovakia"] = 19000, ["Country_data_DEN"] = 34000, ["Country_data_DEU"] = 8600, ["Country_data_DNK"] = 3600, ["Country_data_DOM"] = 7200, ["Country_data_Democratic_Republic_of_the_Congo"] = 13000, ["Country_data_Denmark"] = 69000, ["Country_data_Djibouti"] = 4600, ["Country_data_Dominica"] = 4300, ["Country_data_Dominican_Republic"] = 17000, ["Country_data_ECU"] = 12000, ["Country_data_EGY"] = 13000, ["Country_data_ENG"] = 46000, ["Country_data_ESA"] = 2200, ["Country_data_ESP"] = 72000, ["Country_data_EST"] = 14000, ["Country_data_ETH"] = 3400, ["Country_data_EU"] = 3700, ["Country_data_East_Germany"] = 14000, ["Country_data_East_Timor"] = 4900, ["Country_data_Ecuador"] = 25000, ["Country_data_Egypt"] = 32000, ["Country_data_El_Salvador"] = 13000, ["Country_data_Empire_of_Japan"] = 4000, ["Country_data_England"] = 96000, ["Country_data_Equatorial_Guinea"] = 5200, ["Country_data_Eritrea"] = 5400, ["Country_data_Estonia"] = 34000, ["Country_data_Eswatini"] = 5000, ["Country_data_Ethiopia"] = 13000, ["Country_data_Europe"] = 2400, ["Country_data_European_Union"] = 7300, ["Country_data_FIJ"] = 3800, ["Country_data_FIN"] = 34000, ["Country_data_FRA"] = 97000, ["Country_data_FRG"] = 15000, ["Country_data_FRO"] = 2000, ["Country_data_FR_Yugoslavia"] = 4000, ["Country_data_Faroe_Islands"] = 5400, ["Country_data_Federated_States_of_Micronesia"] = 3000, ["Country_data_Fiji"] = 12000, ["Country_data_Finland"] = 68000, ["Country_data_Florida"] = 6500, ["Country_data_France"] = 192000, ["Country_data_French_Guiana"] = 2100, ["Country_data_French_Polynesia"] = 3800, ["Country_data_GAB"] = 2400, ["Country_data_GAM"] = 2000, ["Country_data_GBR"] = 54000, ["Country_data_GDR"] = 8100, ["Country_data_GEO"] = 14000, ["Country_data_GER"] = 81000, ["Country_data_GHA"] = 9700, ["Country_data_GRE"] = 25000, ["Country_data_GUA"] = 5000, ["Country_data_GUI"] = 3100, ["Country_data_GUY"] = 2300, ["Country_data_Gabon"] = 7500, ["Country_data_Gambia"] = 6800, ["Country_data_Georgia"] = 8200, ["Country_data_Georgia_(U.S._state)"] = 2800, ["Country_data_Georgia_(country)"] = 29000, ["Country_data_German_Empire"] = 5400, ["Country_data_Germany"] = 150000, ["Country_data_Ghana"] = 23000, ["Country_data_Gibraltar"] = 4900, ["Country_data_Great_Britain"] = 73000, ["Country_data_Greece"] = 57000, ["Country_data_Greenland"] = 2800, ["Country_data_Grenada"] = 5100, ["Country_data_Guadeloupe"] = 2800, ["Country_data_Guam"] = 4700, ["Country_data_Guatemala"] = 13000, ["Country_data_Guernsey"] = 2200, ["Country_data_Guinea"] = 8300, ["Country_data_Guinea-Bissau"] = 5000, ["Country_data_Guyana"] = 7400, ["Country_data_HAI"] = 3100, ["Country_data_HKG"] = 13000, ["Country_data_HON"] = 4300, ["Country_data_HUN"] = 37000, ["Country_data_Haiti"] = 8700, ["Country_data_Honduras"] = 12000, ["Country_data_Hong_Kong"] = 26000, ["Country_data_Hungary"] = 70000, ["Country_data_IDN"] = 5000, ["Country_data_INA"] = 10000, ["Country_data_IND"] = 30000, ["Country_data_IRE"] = 10000, ["Country_data_IRI"] = 5400, ["Country_data_IRL"] = 21000, ["Country_data_IRN"] = 6200, ["Country_data_IRQ"] = 4100, ["Country_data_ISL"] = 8500, ["Country_data_ISR"] = 21000, ["Country_data_ITA"] = 85000, ["Country_data_Iceland"] = 23000, ["Country_data_Idaho"] = 2100, ["Country_data_Illinois"] = 4500, ["Country_data_India"] = 109000, ["Country_data_Indiana"] = 2800, ["Country_data_Indonesia"] = 37000, ["Country_data_Iowa"] = 3000, ["Country_data_Iran"] = 91000, ["Country_data_Iraq"] = 14000, ["Country_data_Ireland"] = 34000, ["Country_data_Isle_of_Man"] = 2800, ["Country_data_Israel"] = 45000, ["Country_data_Italy"] = 144000, ["Country_data_Ivory_Coast"] = 18000, ["Country_data_JAM"] = 9400, ["Country_data_JOR"] = 4000, ["Country_data_JP"] = 8100, ["Country_data_JPN"] = 59000, ["Country_data_Jamaica"] = 21000, ["Country_data_Japan"] = 118000, ["Country_data_Jersey"] = 2500, ["Country_data_Jordan"] = 12000, ["Country_data_KAZ"] = 19000, ["Country_data_KEN"] = 7200, ["Country_data_KGZ"] = 3700, ["Country_data_KOR"] = 31000, ["Country_data_KOS"] = 2300, ["Country_data_KSA"] = 5900, ["Country_data_KUW"] = 4100, ["Country_data_Kazakhstan"] = 33000, ["Country_data_Kenya"] = 19000, ["Country_data_Kingdom_of_France"] = 2100, ["Country_data_Kingdom_of_Great_Britain"] = 4800, ["Country_data_Kingdom_of_Italy"] = 4200, ["Country_data_Kiribati"] = 2900, ["Country_data_Kosovo"] = 8700, ["Country_data_Kuwait"] = 11000, ["Country_data_Kyrgyzstan"] = 9300, ["Country_data_LAT"] = 14000, ["Country_data_LBN"] = 2300, ["Country_data_LIB"] = 2500, ["Country_data_LIE"] = 3100, ["Country_data_LIT"] = 3000, ["Country_data_LTU"] = 12000, ["Country_data_LUX"] = 10000, ["Country_data_LVA"] = 2600, ["Country_data_Laos"] = 7500, ["Country_data_Latvia"] = 32000, ["Country_data_Lebanon"] = 15000, ["Country_data_Lesotho"] = 5200, ["Country_data_Liberia"] = 7200, ["Country_data_Libya"] = 8700, ["Country_data_Liechtenstein"] = 7800, ["Country_data_Lithuania"] = 31000, ["Country_data_Luxembourg"] = 24000, ["Country_data_MAC"] = 2400, ["Country_data_MAR"] = 12000, ["Country_data_MAS"] = 11000, ["Country_data_MDA"] = 7600, ["Country_data_MEX"] = 30000, ["Country_data_MGL"] = 2900, ["Country_data_MKD"] = 7500, ["Country_data_MLI"] = 4300, ["Country_data_MLT"] = 5500, ["Country_data_MNE"] = 7800, ["Country_data_MON"] = 3700, ["Country_data_MOZ"] = 2100, ["Country_data_MRI"] = 2000, ["Country_data_MYA"] = 3000, ["Country_data_MYS"] = 3700, ["Country_data_Macau"] = 6300, ["Country_data_Macedonia"] = 4900, ["Country_data_Madagascar"] = 9100, ["Country_data_Malawi"] = 5700, ["Country_data_Malaysia"] = 36000, ["Country_data_Maldives"] = 6000, ["Country_data_Mali"] = 12000, ["Country_data_Malta"] = 17000, ["Country_data_Manitoba"] = 2500, ["Country_data_Marshall_Islands"] = 3700, ["Country_data_Martinique"] = 2800, ["Country_data_Maryland"] = 3100, ["Country_data_Massachusetts"] = 3000, ["Country_data_Mauritania"] = 5800, ["Country_data_Mauritius"] = 8000, ["Country_data_Mexico"] = 66000, ["Country_data_Michigan"] = 4300, ["Country_data_Minnesota"] = 3800, ["Country_data_Missouri"] = 2100, ["Country_data_Moldova"] = 19000, ["Country_data_Monaco"] = 10000, ["Country_data_Mongolia"] = 9700, ["Country_data_Montana"] = 2100, ["Country_data_Montenegro"] = 18000, ["Country_data_Montserrat"] = 2500, ["Country_data_Morocco"] = 27000, ["Country_data_Mozambique"] = 7300, ["Country_data_Myanmar"] = 14000, ["Country_data_NAM"] = 3400, ["Country_data_NED"] = 60000, ["Country_data_NEP"] = 2800, ["Country_data_NGA"] = 8100, ["Country_data_NGR"] = 7900, ["Country_data_NIR"] = 9900, ["Country_data_NLD"] = 6100, ["Country_data_NOR"] = 29000, ["Country_data_NZ"] = 3100, ["Country_data_NZL"] = 32000, ["Country_data_Namibia"] = 9800, ["Country_data_Nauru"] = 2500, ["Country_data_Nazi_Germany"] = 9700, ["Country_data_Nepal"] = 17000, ["Country_data_Netherlands"] = 113000, ["Country_data_Netherlands_Antilles"] = 2300, ["Country_data_New_Brunswick"] = 2500, ["Country_data_New_Caledonia"] = 3400, ["Country_data_New_Jersey"] = 4200, ["Country_data_New_South_Wales"] = 5800, ["Country_data_New_York"] = 4900, ["Country_data_New_York_(state)"] = 6800, ["Country_data_New_Zealand"] = 66000, ["Country_data_Newfoundland_and_Labrador"] = 2300, ["Country_data_Nicaragua"] = 8300, ["Country_data_Niger"] = 5900, ["Country_data_Nigeria"] = 32000, ["Country_data_North_Carolina"] = 3500, ["Country_data_North_Korea"] = 13000, ["Country_data_North_Macedonia"] = 18000, ["Country_data_Northern_Ireland"] = 15000, ["Country_data_Northern_Mariana_Islands"] = 2900, ["Country_data_Norway"] = 72000, ["Country_data_Nova_Scotia"] = 2300, ["Country_data_OMA"] = 2700, ["Country_data_Ohio"] = 4800, ["Country_data_Oman"] = 8700, ["Country_data_Ontario"] = 3800, ["Country_data_Ottoman_Empire"] = 2600, ["Country_data_PAK"] = 8000, ["Country_data_PAN"] = 5700, ["Country_data_PAR"] = 9900, ["Country_data_PER"] = 12000, ["Country_data_PHI"] = 11000, ["Country_data_PHL"] = 2500, ["Country_data_PNG"] = 2700, ["Country_data_POL"] = 49000, ["Country_data_POR"] = 31000, ["Country_data_PRC"] = 2100, ["Country_data_PRK"] = 4600, ["Country_data_PRT"] = 2800, ["Country_data_PUR"] = 7200, ["Country_data_Pakistan"] = 28000, ["Country_data_Palau"] = 3000, ["Country_data_Palestine"] = 6700, ["Country_data_Panama"] = 16000, ["Country_data_Papua_New_Guinea"] = 7900, ["Country_data_Paraguay"] = 21000, ["Country_data_Pennsylvania"] = 3700, ["Country_data_People's_Republic_of_China"] = 3300, ["Country_data_Peru"] = 30000, ["Country_data_Philippines"] = 34000, ["Country_data_Poland"] = 149000, ["Country_data_Portugal"] = 68000, ["Country_data_Prussia"] = 2600, ["Country_data_Puerto_Rico"] = 17000, ["Country_data_QAT"] = 7700, ["Country_data_Qatar"] = 17000, ["Country_data_Quebec"] = 4200, ["Country_data_ROM"] = 13000, ["Country_data_ROU"] = 26000, ["Country_data_RSA"] = 31000, ["Country_data_RUS"] = 62000, ["Country_data_Republic_of_China"] = 5700, ["Country_data_Republic_of_Ireland"] = 25000, ["Country_data_Republic_of_the_Congo"] = 7600, ["Country_data_Romania"] = 68000, ["Country_data_Russia"] = 114000, ["Country_data_Russian_Empire"] = 4900, ["Country_data_Rwanda"] = 7600, ["Country_data_SAM"] = 3100, ["Country_data_SCG"] = 3100, ["Country_data_SCO"] = 26000, ["Country_data_SEN"] = 7900, ["Country_data_SER"] = 3600, ["Country_data_SGP"] = 2600, ["Country_data_SIN"] = 6900, ["Country_data_SLO"] = 19000, ["Country_data_SLV"] = 3000, ["Country_data_SMR"] = 3100, ["Country_data_SPA"] = 4700, ["Country_data_SRB"] = 26000, ["Country_data_SRI"] = 4600, ["Country_data_SUI"] = 42000, ["Country_data_SUR"] = 2000, ["Country_data_SVK"] = 28000, ["Country_data_SVN"] = 6700, ["Country_data_SWE"] = 56000, ["Country_data_SWI"] = 4700, ["Country_data_SYR"] = 3600, ["Country_data_Saint_Kitts_and_Nevis"] = 4800, ["Country_data_Saint_Lucia"] = 4900, ["Country_data_Saint_Vincent_and_the_Grenadines"] = 4800, ["Country_data_Samoa"] = 7700, ["Country_data_San_Marino"] = 8400, ["Country_data_Saskatchewan"] = 2900, ["Country_data_Saudi_Arabia"] = 19000, ["Country_data_Scotland"] = 51000, ["Country_data_Senegal"] = 17000, ["Country_data_Serbia"] = 54000, ["Country_data_Serbia_and_Montenegro"] = 5100, ["Country_data_Seychelles"] = 5500, ["Country_data_Sierra_Leone"] = 7300, ["Country_data_Singapore"] = 27000, ["Country_data_Slovakia"] = 50000, ["Country_data_Slovenia"] = 43000, ["Country_data_Solomon_Islands"] = 4700, ["Country_data_Somalia"] = 6200, ["Country_data_South_Africa"] = 69000, ["Country_data_South_Carolina"] = 3300, ["Country_data_South_Korea"] = 66000, ["Country_data_South_Sudan"] = 4100, ["Country_data_Soviet_Union"] = 36000, ["Country_data_Spain"] = 132000, ["Country_data_Sri_Lanka"] = 19000, ["Country_data_Sudan"] = 8000, ["Country_data_Suriname"] = 6500, ["Country_data_Sweden"] = 100000, ["Country_data_Switzerland"] = 82000, ["Country_data_Syria"] = 15000, ["Country_data_São_Tomé_and_Príncipe"] = 3400, ["Country_data_TAN"] = 2500, ["Country_data_TCH"] = 11000, ["Country_data_THA"] = 21000, ["Country_data_TJK"] = 2600, ["Country_data_TKM"] = 2800, ["Country_data_TPE"] = 15000, ["Country_data_TRI"] = 4700, ["Country_data_TUN"] = 10000, ["Country_data_TUR"] = 27000, ["Country_data_Taiwan"] = 13000, ["Country_data_Tajikistan"] = 9000, ["Country_data_Tanzania"] = 12000, ["Country_data_Texas"] = 5300, ["Country_data_Thailand"] = 44000, ["Country_data_Togo"] = 6900, ["Country_data_Tonga"] = 6400, ["Country_data_Trinidad_and_Tobago"] = 14000, ["Country_data_Tunisia"] = 22000, ["Country_data_Turkey"] = 75000, ["Country_data_Turkmenistan"] = 7800, ["Country_data_Turks_and_Caicos_Islands"] = 2600, ["Country_data_Tuvalu"] = 2800, ["Country_data_U.S."] = 2100, ["Country_data_U.S._Virgin_Islands"] = 4800, ["Country_data_UAE"] = 9200, ["Country_data_UGA"] = 4000, ["Country_data_UK"] = 18000, ["Country_data_UKGBI"] = 3100, ["Country_data_UKR"] = 37000, ["Country_data_URS"] = 14000, ["Country_data_URU"] = 15000, ["Country_data_US"] = 4900, ["Country_data_USA"] = 132000, ["Country_data_USSR"] = 4500, ["Country_data_UZB"] = 12000, ["Country_data_Uganda"] = 13000, ["Country_data_Ukraine"] = 72000, ["Country_data_United_Arab_Emirates"] = 20000, ["Country_data_United_Kingdom"] = 89000, ["Country_data_United_Kingdom_of_Great_Britain_and_Ireland"] = 4400, ["Country_data_United_Nations"] = 4000, ["Country_data_United_States"] = 281000, ["Country_data_United_States_of_America"] = 5000, ["Country_data_Uruguay"] = 29000, ["Country_data_Uzbekistan"] = 21000, ["Country_data_VEN"] = 16000, ["Country_data_VIE"] = 6300, ["Country_data_Vanuatu"] = 5000, ["Country_data_Vatican_City"] = 2300, ["Country_data_Venezuela"] = 33000, ["Country_data_Vietnam"] = 23000, ["Country_data_Virginia"] = 2900, ["Country_data_WAL"] = 17000, ["Country_data_Wales"] = 34000, ["Country_data_Washington"] = 3400, ["Country_data_Washington,_D.C."] = 2200, ["Country_data_Washington_(state)"] = 3700, ["Country_data_West_Germany"] = 24000, ["Country_data_West_Indies"] = 2600, ["Country_data_Wisconsin"] = 5300, ["Country_data_YUG"] = 9700, ["Country_data_Yemen"] = 7700, ["Country_data_Yugoslavia"] = 18000, ["Country_data_ZAF"] = 4700, ["Country_data_ZAM"] = 3200, ["Country_data_ZIM"] = 8200, ["Country_data_Zambia"] = 9600, ["Country_data_Zimbabwe"] = 18000, ["Country_flagbio"] = 27000, ["Country_name"] = 23000, ["Country_showdata"] = 6100, ["Country_topics"] = 22000, ["County"] = 6500, ["County_(judet)_of_Romania"] = 3300, ["Course_assignment"] = 4200, ["Course_details"] = 6200, ["Course_instructor"] = 2400, ["Cquote"] = 37000, ["Cr"] = 4300, ["Cr-rt"] = 2100, ["Create_taxonomy/link"] = 107000, ["Cref2"] = 2300, ["Cricinfo"] = 24000, ["Cricketarchive"] = 3000, ["Crime_opentask"] = 48000, ["Croatian_Census_2011"] = 2100, ["Cross"] = 3200, ["Crossreference"] = 2500, ["Crossreference/styles.css"] = 2500, ["Csv"] = 3000, ["Ct"] = 12000, ["Curlie"] = 6700, ["Currency"] = 3500, ["Current_events"] = 8200, ["Current_events/styles.css"] = 8200, ["Currentdate"] = 22000, ["Cvt"] = 102000, ["Cycling_Archives"] = 4300, ["Cycling_archives"] = 2500, ["Cycling_data_LTS"] = 2100, ["Cycling_team_link"] = 12000, ["Module:CFB_schedule"] = 26000, ["Module:CallAssert"] = 242000, ["Module:CanElecResTopTest"] = 5700, ["Module:CanadaByProvinceCatNav"] = 9800, ["Module:Cat_main"] = 198000, ["Module:Catalog_lookup_link"] = 514000, ["Module:Category_described_in_year"] = 5700, ["Module:Category_described_in_year/conf"] = 5700, ["Module:Category_handler"] = 4410000, ["Module:Category_handler/blacklist"] = 4410000, ["Module:Category_handler/config"] = 4410000, ["Module:Category_handler/data"] = 4410000, ["Module:Category_handler/shared"] = 4410000, ["Module:Category_more_if_exists"] = 41000, ["Module:Category_pair"] = 6100, ["Module:Category_see_also"] = 39000, ["Module:Celestial_object_quadrangle"] = 2300, ["Module:Check_DYK_hook"] = 114000, ["Module:Check_for_clobbered_parameters"] = 1210000, ["Module:Check_for_deprecated_parameters"] = 59000, ["Module:Check_for_unknown_parameters"] = 18200000, ["Module:Check_isxn"] = 481000, ["Module:Check_winner_by_scores"] = 13000, ["Module:Checkuser"] = 75000, ["Module:Chem2"] = 4700, ["Module:Chem2/styles.css"] = 4700, ["Module:Citation/CS1"] = 5560000, ["Module:Citation/CS1/COinS"] = 5560000, ["Module:Citation/CS1/Configuration"] = 5560000, ["Module:Citation/CS1/Date_validation"] = 5560000, ["Module:Citation/CS1/Identifiers"] = 5560000, ["Module:Citation/CS1/Suggestions"] = 26000, ["Module:Citation/CS1/Utilities"] = 5560000, ["Module:Citation/CS1/Whitelist"] = 5560000, ["Module:Citation/CS1/styles.css"] = 5700000, ["Module:Cite_Q"] = 43000, ["Module:Cite_iucn"] = 58000, ["Module:Cite_tweet"] = 35000, ["Module:Cite_web"] = 39000, ["Module:Clade"] = 7500, ["Module:Class"] = 9850000, ["Module:Class/definition.json"] = 9850000, ["Module:Class/styles.css"] = 9040000, ["Module:Class_mask"] = 10400000, ["Module:Clickable_button_2"] = 954000, ["Module:Collapsible_list"] = 55000, ["Module:College_color"] = 127000, ["Module:College_color/data"] = 127000, ["Module:Color_contrast"] = 497000, ["Module:Color_contrast/colors"] = 499000, ["Module:Commons_link"] = 255000, ["Module:Complex_date"] = 65000, ["Module:Convert"] = 1230000, ["Module:Convert/data"] = 1230000, ["Module:Convert/helper"] = 8400, ["Module:Convert/text"] = 1230000, ["Module:Convert/wikidata"] = 3300, ["Module:Convert/wikidata/data"] = 3300, ["Module:ConvertNumeric"] = 21000, ["Module:Convert_character_width"] = 2800, ["Module:Convert_character_width/data"] = 2800, ["Module:Coordinates"] = 1330000, ["Module:Coordinates/styles.css"] = 1330000, ["Module:Copied"] = 18000, ["Module:Count_banners"] = 47000, ["Module:CountryAdjectiveDemonym"] = 44000, ["Module:CountryAdjectiveDemonym/Adjectives"] = 44000, ["Module:CountryAdjectiveDemonym/Demonyms"] = 44000, ["Module:CountryAdjectiveDemonym/The"] = 44000, ["Module:CountryData"] = 142000, ["Module:CountryData/cacheA"] = 12000, ["Module:CountryData/cacheB"] = 8200, ["Module:CountryData/cacheC"] = 12000, ["Module:CountryData/cacheD"] = 4500, ["Module:CountryData/cacheE"] = 2800, ["Module:CountryData/cacheF"] = 2600, ["Module:CountryData/cacheG"] = 2700, ["Module:CountryData/summary"] = 142000, ["Module:Country_adjective"] = 4300, ["Module:Country_alias"] = 51000, ["Module:Country_alias/data"] = 51000, ["Module:Currency"] = 3600, ["Module:Currency/Presentation"] = 3600, } a09e51262a315f683a92a48d27fa16abbb02e956 Template:Module rating 10 946 1882 1881 2023-07-15T17:43:52Z Richard Robin 2 已从[[:wikipedia:Template:Module_rating]]导入1个版本 wikitext text/x-wiki <includeonly>{{#ifeq:{{SUBPAGENAME}}|doc|<!--do not show protection level of the module on the doc page, use the second and optionally third parameter if the doc page is also protected -->{{#if:{{{2|}}}|{{Pp|{{{2}}}|action={{{3|}}}}}}}|{{Module other|{{ombox | type = notice | image = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = [[File:Ambox warning blue construction.svg|40x40px|link=|alt=Pre-alpha]] | alpha | a = [[File:Alpha lowercase.svg|26x26px|link=|alt=Alpha]] | beta | b = [[File:Greek lc beta.svg|40x40px|link=|alt=Beta]] | release | r | general | g = [[File:Green check.svg|40x40px|link=|alt=Ready for use]] | protected | protect | p = [[File:{{#switch:{{#invoke:Effective protection level|edit|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{FULLBASEPAGENAME}}|{{FULLPAGENAME}}}}}}|autoconfirmed=Semi|extendedconfirmed=Extended|accountcreator|templateeditor=Template|#default=Full}}-protection-shackle.svg|40x40px|link=|alt=Protected]] | semiprotected | semiprotect | semi =[[File:Semi-protection-shackle.svg|40x40px|link=|alt=Semi-protected]] }} | style = | textstyle = | text = {{#switch: {{{1|}}} | pre-alpha | prealpha | pa = This module is rated as [[:Category:Modules in pre-alpha development|pre-alpha]]. It is unfinished, and may or may not be in active development. It should not be used from article namespace pages. Modules remain pre-alpha until the original editor (or someone who takes one over if it is abandoned for some time) is satisfied with the basic structure.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in pre-alpha development|{{PAGENAME}}]] }} }} | alpha | a = This module is rated as [[:Category:Modules in alpha|alpha]]. It is ready for third-party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in alpha|{{PAGENAME}}]] }} }} | beta | b = This module is rated as [[:Category:Modules in beta|beta]], and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules in beta|{{PAGENAME}}]] }} }} | release | r | general | g = This module is rated as [[:Category:Modules for general use|ready for general use]]. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by [[Wikipedia:Template sandbox and test cases|sandbox testing]] rather than repeated trial-and-error editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules for general use|{{PAGENAME}}]] }} }} | protected | protect | p = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[Wikipedia:Protection policy|protected]] from editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules subject to page protection|{{PAGENAME}}]] }} }} | semiprotected | semiprotect | semi = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[WP:SEMI|semi-protected]] from editing.<!-- -->{{#switch: {{SUBPAGENAME}}|doc|sandbox=<!-- No category for /doc or /sandbox subpages --> | {{#ifeq: {{{nocat|}}} | true | <!-- No category if user sets nocat=true --> | [[Category:Modules subject to page protection|{{PAGENAME}}]] }} }} | #default = {{error|Module rating is invalid or not specified.}} }} }}|{{error|Error: {{tl|Module rating}} must be placed in the Module namespace.}} [[Category:Pages with templates in the wrong namespace]]|demospace={{{demospace|<noinclude>module</noinclude>}}}}}}}</includeonly><noinclude> {{module rating|release|nocat=true|demospace=module}} {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go in Wikidata. --> </noinclude> bbd244b3ea2e13ec4c1c810ae44f2f3789a93efc Template:Used in system 10 947 1884 1883 2023-07-15T17:43:53Z Richard Robin 2 已从[[:wikipedia:Template:Used_in_system]]导入1个版本 wikitext text/x-wiki {{#invoke:High-use|main|1=|2={{{2|}}}|system={{#if:{{{1|}}}|{{{1}}}|in system messages}}<noinclude>|nocat=true</noinclude>}}<noinclude> {{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> 0abe278369db6cbbe319e7452d7644e27e11c532 Module:Category handler/doc 828 948 1886 1885 2023-07-15T17:43:53Z Richard Robin 2 已从[[:wikipedia:Module:Category_handler/doc]]导入1个版本 wikitext text/x-wiki {{Used in system}} {{Module rating|p}} {{Lua|Module:Category handler/data|Module:Category handler/shared|Module:Category handler/blacklist|Module:Yesno|Module:Arguments}} This module implements the {{tl|category handler}} template. The category handler template helps other templates to automate both categorization and [[Wikipedia:Category suppression|category suppression]]. For information about using the category handler template in other templates, please see the '''[[Template:Category handler|template documentation]]'''. Keep reading for information about using the category handler module in other Lua modules, or for information on exporting this module to other wikis. == Use from other Lua modules == === When not to use this module === For cases where a module only needs to categorise in one of the namespaces main (articles), file (images) or category, then using this module is overkill. Instead, you can simply get a title object using [[mw:Extension:Scribunto/Lua reference manual#mw.title.getCurrentTitle|mw.title.getCurrentTitle]] and check the <code>nsText</code> field. For example: <syntaxhighlight lang="lua"> local title = mw.title.getCurrentTitle() if title.nsText == 'File' then -- do something end </syntaxhighlight> However, if your module needs to categorize in any other namespace, then we recommend you use this module, since it provides proper category suppression and makes it easy to select how to categorize in the different namespaces. === Namespaces === This module detects and groups all the different [[Wikipedia:Namespace|namespaces]] used on Wikipedia into several types. These types are used as parameter names in this module. :'''main''' = Main/article space, as in normal Wikipedia articles. :'''talk''' = Any talk space, such as page names that start with "Talk:", "User talk:", "File talk:" and so on. :'''user, wikipedia, file ... = The other namespaces except the talk pages. Namespace aliases are also accepted. See the table below for the full list.''' :'''other''' = Any namespaces that were not specified as a parameter to the template. See examples below. ;List of possible namespace parameters (excluding <code>''talk''</code> and <code>''other''</code>) {{#invoke:Namespace detect|table}} === Basic usage === This module takes two or more parameters. Here's an example using a hello world program: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'Hello world!' local category = categoryHandler{ '[[Category:Somecat]]', nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> The above example uses the default settings for the category handler module. That means the example module will categorize on pages in the following namespaces: :'''main''', '''file''', '''help''', '''category''', '''portal''' and '''book''' But it will ''not'' categorize in any other namespaces, e.g.: :'''talk''', '''user''', '''wikipedia''', '''mediawiki''', '''template''' ... And it will ''not'' categorize on blacklisted pages. (See section [[#Blacklist|blacklist]] below.) The reason the category handler module does not categorize in some of the namespaces is that in those namespaces most modules and templates are just demonstrated or listed, not used. Thus most modules and templates should not categorize in those namespaces. Any module or template that is meant for one or more of the namespaces where this module categorizes can use the basic syntax as shown above. === Advanced usage === This module takes one or more parameters named after the different page types as listed in section [[#Namespaces|namespaces]] above. By using those parameters you can specify exactly in which namespaces your template should categorize. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module meant for articles and talk pages.' local category = categoryHandler{ main = '[[Category:Somecat1]]', -- Categorize in main (article) space talk = '[[Category:Somecat2]]', -- Categorize in talk space nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> The above module will only categorize in main and talk space. But it will not categorize on /archive pages since they are blacklisted. (See section [[#Blacklist|blacklist]] below.) And if you need to demonstrate (discuss) the module on a talkpage, then you can feed "<code>nocat='true'</code>" to prevent that template from categorizing. (See section [[#Nocat|nocat]] below.) Like this: <pre> == My new module == Hey guys, have you seen my new module? {{#invoke:mymodule|main|nocat=true}} Nice, isn't it? --~~~~ </pre> Sometimes we want to use the same category in several namespaces, then do like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used in several namespaces.' local category = categoryHandler{ main = '[[Category:Somecat1]]', [ 1 ] = '[[Category:Somecat2]]', -- For help and user space help = 1, user = 1, talk = '', -- No categories on talk pages other = '[[Category:Somecat3]]', -- For all other namespaces nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> In the above example we use a numbered parameter to feed one of the categories, and then we tell this module to use that numbered parameter for both the help and user space. The category handler module understands an unlimited number of numbered parameters. The '''other''' parameter defines what should be used in the remaining namespaces that have not explicitly been fed data. Note the empty but defined '''talk''' parameter. That stops this module from showing what has been fed to the '''other''' parameter, when in talk space. The category handler module also has a parameter called '''all'''. It works like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used in all namespaces.' local category = categoryHandler{ all = '[[Category:Somecat1]]', -- Categorize in all namespaces nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> The above example will categorize in all namespaces, but not on blacklisted pages. If you want to demonstrate that module on a page, then use "<code>nocat=true</code>" to prevent the template from categorizing. We suggest avoiding the '''all''' parameter, since modules and templates should preferably only categorize in the namespaces they need to. The all parameter can also be combined with the rest of the parameters. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used in all namespaces.' local category = categoryHandler{ all = '[[Category:Somecat1]]', -- Categorize in all namespaces main = '[[Category:Somecat2]]', -- And add this in main space other = '[[Category:Somecat3]]', -- And add this in all other namespaces nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> If the above module is placed on an article, then it will add the categories "Somecat1" and "Somecat2". But on all other types of pages it will instead add "Somecat1" and "Somecat3". As the example shows, the all parameter works independently of the rest of the parameters. === Subpages === The category handler module understands the '''subpage''' parameter. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used in all namespaces.' local category = categoryHandler{ subpage = 'no' -- Don't categorize on subpages wikipedia = '[[Category:Somecat]]', nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> If "<code>subpage='no'</code>" then this template will ''not'' categorize on subpages. For the rare occasion you ''only'' want to categorize on subpages, then use "<code>subpage='only'</code>". If '''subpage''' is empty or undefined then this template categorizes both on basepages and on subpages. === Blacklist === This module has a blacklist of the pages and page types where templates should not auto-categorize. Thus modules that use this meta-template will for instance not categorize on /archive pages and on the subpages of [[Wikipedia:Template messages]]. If you want a template to categorize on a blacklisted page, then feed "<code><nowiki>nocat = false</nowiki></code>" to the module when you place it on the page, thus skipping the blacklist check. Note that this module only categorizes if it has data for the namespace. For instance, if the basic syntax is used (see [[#Basic usage|basic usage]] above), then even if you set "<code>nocat = false</code>" the template will not categorize on a talk page, since it has no data for talk pages. But it has data for help space, so on a blacklisted help page it will categorize. The blacklist is located in the configuration table <code>cfg.blacklist</code> near the top of the module code. === The "nocat" parameter === This module understands the '''nocat''' parameter: * If "<code>nocat = true</code>" then this template does ''not'' categorize. * If '''nocat''' is <code>nil</code> then this template categorizes as usual. * If "<code>nocat = false</code>" this template categorizes even when on blacklisted pages. (See section [[#Blacklist|blacklist]] above.) * The nocat parameter also accepts aliases for <code>true</code> and <code>false</code> as defined by [[Module:Yesno]], e.g. "yes", "y", "true", and 1 for <code>true</code>, and "no", "n", "false", and 0 for <code>false</code>. Modules and templates that use {{tlf|category handler}} should forward '''nocat''', so they too understand '''nocat'''. The code "<code>nocat = frame.args.nocat</code>" shown in the examples on this page does that. === The "categories" parameter === For backwards compatibility this module also understands the '''categories''' parameter. It works the same as '''nocat'''. Like this: * If "<code>categories = false</code>" then this template does ''not'' categorize. * If '''categories''' is empty or undefined then this template categorizes as usual. * If "<code>categories = true</code>" this template categorizes even when on blacklisted pages. * The categories parameter also accepts aliases for <code>true</code> and <code>false</code> as defined by [[Module:Yesno]], e.g. "yes", "y", "true", and 1 for <code>true</code>, and "no", "n", "false", and 0 for <code>false</code>. === The "category2" parameter === For backwards compatibility this template kind of supports the old "category =" parameter. But the parameter name "category" is already used in this module to feed category data for when in category space. So instead this template uses '''category2''' for the usage similar to '''nocat'''. Like this: * If "<code>category2 = "</code>" (empty but defined), or "<code>category2 = 'no'</code>", or if '''category2''' is fed any other data (except as described in the next two points), then this template does ''not'' categorize. * If '''category2''' is undefined or if "<code>category2 = '¬'</code>", then this template categorizes as usual. * If "<code>category2 = 'yes'</code>" this template categorizes even when on blacklisted pages. === Categories and text === Besides from categories, you can feed anything else to this module, for instance some text. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local result = 'This is a module used on talk pages.' local category = categoryHandler{ talk = '[[Category:Somecat]]', other = '<p class="error">This module should only be used on talk pages.</p>', nocat = frame.args.nocat -- So "nocat=true/false" works } category = category or '' -- Check that we don't have a nil value for the category variable. return result .. category end return p </syntaxhighlight> When the module code above is used on anything other than a talk page, it will look like this: :This is a module used on talk pages.{{#invoke:category handler|main | talk = [[Category:Somecat]] | other = <p class="error">This module should only be used on talk pages.</p> | nocat = {{{nocat|}}} <!--So "nocat=true/false" works--> }} That text will not show on blacklisted pages, so don't use this method to show any important information. Feeding "<code>nocat = 'true'</code>" to the template hides the text, just as it suppresses any categories. === The "page" parameter === For testing and demonstration purposes this module can take a parameter named '''page'''. Like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local category = categoryHandler{ main = 'Category:Some cat', talk = 'Category:Talk cat', nocat = frame.args.nocat, -- So "nocat=true/false" works page = 'User talk:Example' } return category end return p </syntaxhighlight> In the above code we on purpose left out the brackets around the category names so we see the output on the page. No matter on what kind of page the code above is used it will return this: :{{#invoke:category handler|main | main = Category:Some cat | talk = Category:Talk cat | nocat = {{{nocat|}}} <!--So "nocat=true/false" works--> | page = User talk:Example }} The '''page''' parameter makes this module behave exactly as if on that page. Even the blacklist works. The pagename doesn't have to be an existing page. If the '''page''' parameter is empty or undefined, the name of the current page determines the result. You can make it so your module also understands the '''page''' parameter. That means you can test how your template will categorize on different pages, without having to actually edit those pages. Then do like this: <syntaxhighlight lang="lua"> p = {} local categoryHandler = require( 'Module:Category handler' ).main function p.main( frame ) local category = categoryHandler{ main = 'Category:Some cat', talk = 'Category:Talk cat', nocat = frame.args.nocat, -- So "nocat=true/false" works page = frame.args.page -- For testing } return category end return p </syntaxhighlight> === Parameters === List of all parameters: * First positional parameter - for default settings * subpage = 'no' / 'only' * 1, 2, 3 ... * all = '<nowiki>[[Category:Somecat]]</nowiki>' / 'Text' * main = 1, 2, 3 ... / '<nowiki>[[Category:Somecat]]</nowiki>' / 'Text' * ... * other = 1, 2, 3 ... / '<nowiki>[[Category:Somecat]]</nowiki>' / 'Text' * nocat = frame.args.nocat / true / false / 'yes' / 'no' / 'y' / 'n' / 'true' / 'false' / 1 / 0 * categories = frame.args.categories / false / true / 'no' / 'yes' / 'n' / 'y' / 'false' / 'true' / 0 / 1 * category2 = frame.args.category or '¬' / 'no' / 'not defined' / '¬' / 'yes' * page = frame.args.page / 'User:Example' Note that empty values to the "main" ... "other" parameters have special meaning (see examples above). The "all" parameter doesn't understand numbered parameters, since there should never be a need for that. == Exporting to other wikis == This module can be exported to other wikis by changing the configuration values in the <code>cfg</code> table. All the variable values are configurable, so after the configuration values have been set there should be no need to alter the main module code. Details of each configuration value are included in the module code comments. In addition, this module requires [[Module:Namespace detect]] to be available on the local wiki. == See also == * {{tl|Category handler}} – for using this module with templates, rather than Lua modules. * [[Wikipedia:Category suppression]] – The how-to guide. * [[Wikipedia:WikiProject Category Suppression]] – The WikiProject. * [[Wikipedia:Namespace]] – Lists all the namespaces. 603e893f1993e7e6fa21bb562e50d87d4daccf94 Template:需要翻译 10 931 1887 1855 2023-07-15T17:45:19Z Richard Robin 2 蹦出来这么多把我吓一跳哈哈哈 wikitext text/x-wiki {{mbox | text = '''<big><big>这个页面的内容需要翻译。</big></big>'''<br> 我们非常欢迎各位有能力的朋友协助我们翻译这些页面,但也请各位量力而行,不要使用机翻导致翻译出来的东西无法理解。请使用本土化的语言(尤其是在中文版已经出现的专有名词)。 | type = | image = [[File:Profinkling.png|100px|center]] | sect = | issue = | talk = | fix = | date = | cat = | all = }} 1e6139b3df53d58c16c26eb92ac2a7cd679cf08a 海底小纵队与鲸鲨 0 65 1888 93 2023-07-15T17:49:49Z Richard Robin 2 增加“需要翻译”模板 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与鲸鲨</big><br>The Octonauts and the Whale Shark | image = The Octonauts and the Whale Shark.png | width = 300px | imgwidth = 300px | bgcolor = #96FED1 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月4日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=英文版没有上一集<br> [[海底小纵队与装饰蟹|装饰蟹]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与海底风暴|海底风暴]](英文版)<br> [[海底小纵队与雪茄鲛|雪茄鲛]](中文版)}} |} '''海底小纵队与鲸鲨'''("The Octonauts and the Whale Shark")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中属于名副其实的“第1季第1集” <ref>{{cite web | title = The Whale Shark Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Whale_Shark | date = 2022-09-29 | archiveurl = http://archive.today/8o6Zk | archivedate = 2022-09-29 }}</ref>,中文版则被安排在了第1季第14集中。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] *[[章教授]] *[[小萝卜]]和[[植物鱼]]们 *[[鲸鲨(角色)| 鲸鲨]] *Firefly Squid ==舰艇== *[[灯笼鱼艇]] ==Plot== ==='''The "Cave"'''=== [[Captain Barnacles]], [[Shellington]], and [[Peso]] are looking at pictures being sent to the [[Octopod]] by [[Dashi]], who is exploring an underwater cave. Peso notices the cave floor is red and wiggly. Barnacles comments on how some rocks hanging from the cave roof look "kind of familiar". Shellington then notices that they are not rocks, but teeth and that the floor is a tongue! Barnacles and Shellington then realize the truth - Dashi's not inside a cave, but a whale shark! The Captain contacts Dashi and tells her to leave the "cave" immediately, and she swims towards the mouth, but drops her camera and has to swim back for it. The whale shark closes its mouth and she, therefore, does not make it out in time. Shellington can't radio her as the signal has been lost now that the mouth is shut. Captain Barnacles tells Peso to sound the [[Octo-Alert]]! He commands all the Octonauts to report to the [[Launch bay|launch bay]]. ==='''The Mission'''=== Captain Barnacles informs the other Octonauts ([[Kwazii]], [[Tweak]], [[Tunip]], and [[Professor Inkling]]) that Dashi has been swallowed by a whale shark. Tunip asks Shellington if a whale shark is a whale. Shellington tells him that a whale shark is not a whale, but a shark (which is a fish) and the biggest fish in the ocean. Professor Inkling mentions how the fish is a ''filter feeder'', which means it just opens its mouth and swallows whatever's there (meaning it didn't swallow Dashi on purpose). Barnacles instructs Kwazii and Peso to enter the [[GUP-A]] to go and save her. Tweak gives the captain a whale shark detector so they'll know where the whale shark is. She opens the [[Octo-Hatch]] and they go. Peso keeps a lookout in the GUP-A while Barnacles and Kwazii plan tactics outside. Unfortunately, despite Peso's attempts to warn them, they do not notice the whale shark approaching and are also swallowed up... ==='''Inside the Whale Shark'''=== Barnacles and Kwazii are now inside the whale shark with Dashi. However, she doesn't seem to be anywhere around, so a little exploring is in order. Kwazii notices a hair clip belonging to Dashi, on the floor on their side of the shark's sponge wall, which means Dashi is on the other side. They squeeze through and fall down a dark tunnel! They hear a strange clicking sound and wonder what it is. Then out of nowhere, Dashi appears clicking her camera! She tells them they're inside the whale shark's stomach! The Captain says they need to get out now before they sink through. So they climb back up the tunnel and through the sponge wall, all the way back to the mouth. ==='''Peso and the Whale Shark'''=== Outside, Peso is trying to contact Captain Barnacles and Kwazii, with no success, when the whale shark moans in pain. Peso, being a medic, goes to investigate. He checks the whale shark's ear and nose but then sees the pain is in the whale shark's stomach. However, the whale shark seems unwilling to open its mouth. Peso reads his medical book and finds out if you tickle a whale shark's gills, he opens his mouth! So that's exactly what he does. ==='''Barnacles, Kwazii and Dashi Escape'''=== With the combined effort of the three Octonauts inside trying to push open the mouth, and Peso tickling the gills, Captain Barnacles, Kwazii and Dashi escape from the whale shark! Its stomachache is now cured, and the Octonauts are free, but Kwazii later makes the mistake of calling it little, causing it to burp at him (and inadvertently the others) in retaliation. ==='''Back Home'''=== Shellington and Dashi are deciding which of the pictures Dashi took to send to National Seographic (a parody of National Geographic). Professor Inkling says they should send them all, when a picture appears on the screen of Barnacles holding a startled looking Kwazii when they first saw Dashi in the whale shark's stomach. They quickly say not all of the pictures are nice, and she should probably skip some. Tunip and another Vegimal ([[Codish|Codish)]] then imitate the picture on the screen, jumping into each others arms. This makes everyone laugh, and the episode ends. ==Trivia/Goofs== * The characters paired up for this mission are [[Captain Barnacles]], [[Kwazii Cat|Kwazii]], [[Peso Penguin|Peso]], and [[Dashi]]. * This episode’s Creature Report is on [[Whale Shark (Character)| Whale Sharks]]. *An episode in season 2, [[The Porcupine Puffer]], is a bit like a sequel to this episode. *This episode was aired as the fourteenth episode in the US version. *This is the pilot episode of Octonauts in the UK version. *In the US version, this episode begins after "The Decorator Crab". [[Category:剧集]] [[Category:第一季]] 086247dacf24da248100b073e90bedef92fc2e37 海底小纵队与海底风暴 0 67 1889 97 2023-07-15T17:50:50Z Richard Robin 2 增加“需要翻译”模板 wikitext text/x-wiki {{需要翻译}}{{Simpleboxtop | title = | toptext = <big>海底小纵队与海底风暴</big><br><small>The Octonauts and the Undersea Storm</small> | image = The Octonauts and the Underwater Storm.png | width = 300px | imgwidth = 300px | bgcolor = #ACD6FF | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月5日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>中文版没有上一集}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与螃蟹海胆|螃蟹海胆]](英文版)<br> [[海底小纵队与大王乌贼|大王乌贼]](中文版)}} |} '''海底小纵队与海底风暴'''("The Octonauts and the Undersea Storm")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在中文版作为第1季第1集播出<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref>,英国英文版则为第1季第2集,美国英文版也将其作为试播集播出。<ref> {{cite web | title = The Undersea Storm Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Undersea_Storm | date = 2022-09-29 | archiveurl = http://archive.today/QBZju | archivedate = 2022-09-29 }} </ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *The [[Reef Lobsters]] *[[Sea Urchin]] and zebra fish and green turtle and octopus and snot sea cucumber and crabs and green eel and hermit crabs (不完整,待补充) ==舰艇== *[[虎鲨艇]] *[[蓝鲸艇]] ==Summary== ==='''A New Upgrade'''=== The episode begins with [[Tweak]] working on the [[Gup-B]], adding a turbo button that [[Kwazii]] approves. He later goes out for a test drive, but ignores [[Tweak]]'s reminders of the conditions to use the turbo button, much to her chagrin. He enjoys himself. Meanwhile, [[Dashi]] suddenly alerts [[Captain Barnacles]] of a large storm using the [[Storm Tracker]]. A look from the [[Octoscope]] confirms this, and soon, all hands are on deck at making the [[Octopod]] safe for the storm, but when Barnacles got to Kwazii, a nervous Tweak then tells him about the test drive. ==='''Test Drive'''=== As expected, Kwazii was having the time of his life, entertaining a young [https://en.wikipedia.org/wiki/Reef_lobster reef lobster] who soon blows away. Kwazii notices this, and immediately heads out to rescue it. Unfortunately, it caused him to miss a call from Dashi. As he returns the little lobster, only then does he know about the storm. After a painful handshake, he sets off to save the creatures in the storm, receiving a second call from the [[Octopod]]. Letting them know of his current task, he sets out after getting permission from Barnacles. ==='''The Crash'''=== Multiple animals were rescued, and Kwazii sets off to the Octopod, seeing the little reef lobster along the way. Unfortunately, the Gup-B struggles against the storm, prompting him to use the turbo button - only to crash into some rocks. After losing contact, Barnacles heads out on a rescue mission in the [[Gup-C]], planning on towing the Gup-B home. However, the rescue attempt almost fails as the cable snaps, but luckily, the little reef lobster and his family form a chain and linked the cable. ==='''Return to the Octopod'''=== After pulling the Gup-B free, Barnacles heads back as fast as he can, with the little lobster and his family keeping the Gup-B secure behind. They make it just in time. All the Octonauts are safe and sound inside, with Kwazii and Barnacles giving their thanks to the little lobster. He accepts, and decides to stay in the Octopod for the time being. Tweak provides some commentary on the test drive, and soon, everyone was enjoying hot cocoa. ==Trivia/Goofs== * The characters paired up for this mission are [[Captain Barnacles]] and [[Kwazii Cat|Kwazii]]. * This episode’s Creature Report is on [[Reef Lobsters]] * This is the pilot episode of Octonauts in the US version. * The little lobster's family keeps changing size throughout the episode. * When Dashi says The storm is 10 minutes she is rather smiling then worried. * The 2 zebrafish Kwazii rescues lose their white pupils when the get to the reef. *This is the first episode where an octonaut crashes a gup, in this case its Kwazii. [[Category:剧集]] [[Category:第一季]] 755eba352367d7fecd62efbc4223199a4ce4d019 海底小纵队与大王乌贼 0 85 1890 124 2023-07-15T17:51:13Z Richard Robin 2 增加“需要翻译”模板 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与大王乌贼</big><br>The Octonauts and the Giant Squid | image = The_giant_squid_title_card.png | width = 300px | imgwidth = 300px | bgcolor = #91cad9 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月11日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与小飞鱼|小飞鱼]](英文版)<br> [[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与大虎鲸|大虎鲸]](英文版)<br> [[海底小纵队与逃离海藻行动|逃离海藻行动]](中文版)}} |} '''海底小纵队与大王乌贼'''("The Octonauts and the Giant Squid")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第6集,中文版则为第1季第2集。 While exploring the ocean, [[Captain Barnacles]] and [[Kwazii Cat|Kwazii]] inside the [[Gup-A]] were grabbed by a mysterious creature. [[Inkling|Professor Inkling]] discovers that the creature that grabbed the Gup-A is his long-lost cousin, [[Irving]] the Giant Squid. Inkling explores in the Gup-A to help Irving. Irving tells Inkling that he was very hungry, and so the professor got him several baskets of fish biscuits. He eats a lot of fish biscuits, which shows that he likes them. ==Summary== ==='''Attack!'''=== Professor Inkling is with the Vegimals baking fish biscuits in the kitchen when suddenly he gets called to the HQ. He tells the Vegimals to take the biscuits out of the oven while he's gone. Once he gets to HQ, he witnesses Barnacles and Kwazii in the Gup that has been grasped by a strange creature. As they manage to escape, the creature squirts ink. They return to the Octopod. ==='''Inkling's Cousin'''=== As [[Tweak]] inspects the ink on the Gup, Inkling deduces that the marks were made by his cousin, Irving the giant squid. He has [[Dashi]] show them his family photos, until they reach the one with the giant squid, only to find that it's not a good picture. He explains that the octopus and squid are in the same family, that they both have arms with suckers that help them grasp objects and they squirt ink to get away or hide from predators. When Kwazii asks why Irving grabbed the Gup, Inkling suggests that he was probably asking for help. Inkling sounds the Octo-alert. ==='''Family Reunion'''=== Barnacles, Kwazii, [[Peso]], and Inkling climb into the Gup and Tunip gives them a bunch of baskets full of fish biscuits. When they depart, Barnacles, Kwazii, and Peso search nearby caves looking for the giant squid while Inkling stayed behind. While he did, Irving shows up near the Gup and Inkling feeds him a basket of fish biscuits. Irving recognizes his cousin and explains that he grabbed the Gup because he thought it was food. He has the other three give him the baskets. They all, including Irving, return to the Octopod and Dashi takes another photo of Inkling and Irving. ==Creature Report== *[[Irving]] the Giant Squid ==Trivia/Goofs== * This episode comes right after [[The Undersea Storm]] in the US version. [[Category:剧集]] [[Category:第一季]] 6321344e6c11d1957fa4103ecf2fb51d298d10c5 海底小纵队与大虎鲸 0 88 1891 128 2023-07-15T17:51:33Z Richard Robin 2 增加“需要翻译”模板 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与大虎鲸</big><br>The Octonauts and the Orcas | image = Orcas_title_card.jpg | width = 300px | imgwidth = 300px | bgcolor = #97cedd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月12日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与大王乌贼|大王乌贼]](英文版)<br> [[海底小纵队与桨足动物|桨足动物]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与逃离海藻行动|逃离海藻行动]](英文版)<br> [[海底小纵队与水滴鱼兄弟|水滴鱼兄弟]](中文版)}} |} '''海底小纵队与大虎鲸'''("The Octonauts and the Orcas")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第7集,中文版则为第1季第11集。 == Summary == [[Captain Barnacles]] was practicing his accordion and he attracts a pod of Orca whales to the [[Octopod]]. While [[Kwazii Cat|Kwazii]] is in the [[Gup-B]] racing with an Orca, both end up on an island inhabited by fiddler crabs. The Orca soon gets beached on the island's surface and the Octonauts have to try and help keep the Orca as wet as they can and get him back into the ocean. == Plot == === '''Annoying Sound''' === Barnacles is playing his accordion in his room Kwazii comes in telling captain if he could practice somewhere else. Just then, their ship gets hit by something and Barnacles tells Kwazii to sound the octo-alert. Barnacles, Kwazii, and the other Octonauts meet at the HQ when their ship gets hit again. They then see a whale called a orca and many more also arrive. === '''New friends''' === Barnacles and Kwazii look outside the window when a orca aggressively swims over and rams the octopod. Kwazii tells Barnacles that they have to bump him back but the captain says that they should talk before they bump. Barnacles tells the orcas to not bump their ship. Suddenly the male orca gets ready to ram the octopod again only to get stopped by the female orca which tells the other orcas to get back. The female orca apologizes and explains that they heard the octopod making strange noises. Barnacles tells them that it was him having trouble playing his accordion but the orcas thought it sounded quite lovely (which Kwazii disagrees). === '''Going outside to meet their new friends''' === The Octonauts exit the octopod and meet the orcas, Shellington records the orcas calls, Tweak measures how long the orcas are, Dashi takes lots of pictures of the orcas. The male orca that bumped the octopod asks Kwazii if he wants to race, when Kwazii decides to race him, the orca takes off without saying go. This forces Kwazii to go full speed on the Gup-B in order to keep up with the orca. Barnacles keeps an eye on Kwazii and the orca on the radar just in case something goes wrong. === '''Gup-B vs. Orca Whale''' === Meanwhile, Kwazii is still trying to keep up with the orca. However they're heading straight for a beach. Barnacles hops into the Gup-D in an attempt to stop them but its too late. Meanwhile, the orca wins the race by beaching himself on the beach and chanting to himself that he won. Kwazii arrives and says "he had a head start" but the Orca replies that he can have a head start next time but he'll still win. The orca then is unable to get back into the water (well whose fault is that?) and tells Kwazii to give him a push. Kwazii charges at the orca to try to push him only to bounce off the orcas head and land on the sand. Just then Barnacles arrives and asks Kwazii to keep the orca wet with a bucket in the Gup. === '''Rescuing the Orca: Part 1''' === Barnacles contacts the Octopod and the other Octonauts arrive on the beach, Tweak says they will need rope and lots of it. They tie the ropes onto the fins of the orca and Barnacles gives the command to pull but the Orca cries out in pain and says that it really hurts and Barnacles tells them to stop pulling. Barnacles asks the Fiddler Crabs if they can get the ropes under the Orca but the Crabs refuse to help; saying that its his fault getting himself stuck on the beach. A wave then comes and the leader of the Fiddler Crabs gets flipped upside down, Barnacles helps him up and the Crabs agree to help. === '''Rescuing the Orca: Part 2''' === The Crabs move the ropes under the orca so that way it wraps around him and doesn't pull too hard on the orcas fins. Once they're done wrapping the ropes around the Orca, Barnacles gives the command to pull again which works and the Orca is freed from being stranded on the beach. Back at the octopod, the Orcas thank the Octonauts and tells Barnacles to practice their special signal much to Kwazii's dismay, the Orcas say goodbye and leaves. ==Creature Report== * [[Orcas]] ==Trivia/Goofs== *In the UK version of the episode, [[Tweak]] says "There's another! And another!". In the US version, the "And another!" bit is said by [[Dashi]] instead. *Many people believe Orcas are whales, while most sources say that they are actually the largest dolphins in the ocean. Whales and dolphins are distant relatives, so it may make sense of what people believe. *This is the first episode to show a species of whale, or cetacean. *The Octonauts react to the Orcas bumping the Octopod before it even happens. *When the Vegimals were carrying the Water bucket. Another Codish and Tominnow could be seen. It’s likely these were before [[Pikato]] and [[Halibeet]] were added, however [[Sharchini]] is nowhere to be seen. Likely boosting this theory’s possibility. As there would’ve been another Grouber shown. Plus, they continued passing the bucket, despite there not being another one. *The Vegimals were also singing the exact same tune they sang when they were hatching, and riding the Gup-V in [[A Very Vegimal Christmas]] [[Category:剧集]] [[Category:第一季]] 9c63f372316267d8daa6349c606d5dfe9bd69913 海底小纵队与小飞鱼 0 75 1892 114 2023-07-15T17:51:59Z Richard Robin 2 增加“需要翻译”模板 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与小飞鱼</big><br>The Octonauts and the Flying Fish | image = The_Flying_Fish.jpg | width = 300px | imgwidth = 300px | bgcolor = #9bb4ed | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月8日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与海象首领|海象首领]]}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与大王乌贼|大王乌贼]](英文版)<br> [[海底小纵队与独角鲸|独角鲸]](中文版)}} |} '''海底小纵队与小飞鱼'''("The Octonauts and the Flying Fish")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版和中文版中皆为第1季第5集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> == Summary == [[Inkling|Professor Inkling]] shows [[Shellington Sea Otter|Shellington]], [[Captain Barnacles]] and [[Kwazii Cat|Kwazii]] an old journal that belonged to Inkling's grandfather that shows a missing page. As the [[Octonauts]] travel above the ocean a school of flying fish appear and accidentally steal Shellington's waterproof satchel, which had the professor's book inside, as [[Kwazii]] in his upgraded [[Gup-B]] with flying fish mode tries to retrieve the satchel. == Plot == ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[突突兔]] *[[章教授]] ==Creature Report== *Flying Fish ==Trivia/Goofs== *The Gup-B gets its first upgrade: Flying Fish Mode. *When Peso activates his helmet, there is a rendering error on his flipper and his collar. [[Category:剧集]] [[Category:第一季]] b6e4a65e4a0b1dac579452c30b702ab4ca974e05 海底小纵队与海象首领 0 73 1893 112 2023-07-15T17:52:18Z Richard Robin 2 增加“需要翻译”模板 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与海象首领</big><br>The Octonauts and the Walrus Chief | image = Walrus chief title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #9bccdd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月7日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与螃蟹海胆|螃蟹海胆]](英文版)<br> [[海底小纵队与逃离海藻行动|逃离海藻行动]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与小飞鱼|小飞鱼]]}} |} '''海底小纵队与海象首领'''("The Octonauts and the Walrus Chief")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版和中文版中皆为第1季第4集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] *[[小萝卜]] (不完全,待补全) == Summary == A walrus steals [[Peso]]'s medical bag and mistakes it for a funny-looking white clam. The Octonauts travel inside a walrus colony, but the walruses don't let them enter as it is a walrus-only territory. [[Captain Barnacles]], [[Kwazii]] and Peso think of another plan to get the medical bag - by disguising themselves as a walrus, but when they’re exposed, they soon find themselves face-to-face with the colony's walrus chief who has a twisted flipper and has been relying on the other walruses to bring him food since he can't swim. == Plot == ==Creature Report== * [[Walrus]] ==Trivia== * [[Dashi]] and [[Tunip the Vegimal|Tunip]] are non-speaking characters during the episode until the end. * In reality, a group of walruses is known as a herd. [[Category:剧集]] [[Category:第一季]] e877cf15828228204d8dc9ecc8c34577de42005e 海底小纵队与螃蟹海胆 0 70 1894 111 2023-07-15T17:52:39Z Richard Robin 2 增加“需要翻译”模板 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与螃蟹海胆</big><br><small>The Octonauts and the Crab and Urchin</small> | image = Crab and urchin title card.jpg | width = 300px | imgwidth = 300px | bgcolor = #849cc8 | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月6日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与海底风暴|海底风暴]](英文版)<br> [[海底小纵队与怪兽地图|怪兽地图]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与海象首领|海象首领]](英文版)<br> [[海底小纵队与白化座头鲸|白化座头鲸]](中文版)}} |} '''海底小纵队与螃蟹海胆'''("The Octonauts and the Crab and Urchin")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中为第1季第3集<ref>{{cite web | title = The Crab and Urchin Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Crab_and_Urchin | date = 2022-09-30 | archiveurl = http://archive.today/ptdI7 | archivedate = 2022-09-30 }}</ref>,中文版为第1季第8集。<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *[[皮医生]] *[[谢灵通]] *[[达西西]] *[[突突兔]] (不完全,待补全) == Synopsis == === '''Someone's at the Door''' === The episode starts with [[Kwazii Cat|Kwazii]] and [[Captain Barnacles]] waking up to a loud banging noise. The two decide to have a race to the door of the [[Octopod]]. Kwazii arrives at the door first, but is stuck at the point of opening it, so Barnacles helps instead. However, when they first opened the door, no one was there but when they closed the door the banging continued. So they opened the door eventually finding that a [[Sea Snails|sea snail]] was at the door. The snail expresses his troubles to the two telling them some kind of half crab half sea urchin is keeping all the sea snails awake. Both Kwazii and Barnacles want to sort out the problem so they have a race to the [[List of Gups|Gups]] and then to the reef. === '''Arguing Halfs''' === Barnacles wins the race by going down the quickest route. The snail then shows both of them the creature who's making the noise which to no surprise is arguing with itself, but Barnacles and Kwazii don't know what the creature is and so decide to contact a sleepy [[Shellington Sea Otter|Shellington]]. Shellington tells them that the creature is two creatures a crab with a [[Sea Urchin|sea urchin]] stuck to its back as a process of symbiosis as both creatures rely on each other for food and protection. Barnacles tries to get their attention but they start arguing about who the problem is. Kwazii suggests splitting the two apart just for a bit the urchin and crab agree. Kwazii takes the urchin to the other side of the reef while the crab stays on a rock telling Barnacles that he's fine on his own, but the crab gets scared away by a lobster so Barnacles decides to teach the crab how to protect himself. === '''Separation''' === Meanwhile Kwazii tries to find a spot for the urchin to stay but almost all areas according to the urchin do not have enough food for him. The urchin once finding a good spot asks Kwazii if he has any snacks which he does not so the urchin then asks Kwazii what the plan is, but Kwazii doesn't have a plan. But he knows someone who does and goes to find Barnacles. Barnacles tries to teach the crab that it's about attitude and confidence but the crab can't make himself look scary. So they decide to look for Kwazii. === '''Back Together''' === Barnacles and Kwazii then bump into each other while looking for each other resulting in the urchin and crab reuniting back together. Both the crab and urchin realize how important each other are. And so the episode end with Captain Barnacles and Kwazii racing each other back to the Octopod in the [[Gup-D]] and [[Gup-B]]. ==Creature Report == *A [[Blue Crab|crab]] and a [[Sea Urchin|sea urchin]] ==Trivia/Goofs== *[[Inkling|Professor Inkling]] and the [[Vegimals]] are not in this episode.  *When [[Dashi]] is shown inside the Octo-Alert, her headphones are missing.  *Parallel: Barnacles and Kwazii were having the same problem the crab and urchin were having. Competing or racing with each other to see who gets a task done faster. They all soon realize that working together is always vital. *The crab in this episode is supposed to be a carrier crab, but he instead looks like a blue crab. [[Category:剧集]] [[Category:第一季]] 06e2c350ffea5049a7de6b297b370ed70d68bdf2 Template:Ambox 10 949 1896 1895 2023-07-15T17:58:17Z Richard Robin 2 已从[[:wikipedia:Template:Ambox]]导入1个版本 wikitext text/x-wiki {{#invoke:Message box|ambox}}{{#ifeq:{{{small}}};{{NAMESPACENUMBER}}|left;0|[[Category:Articles using small message boxes]]}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0c13ec156138ae0499c998cc3d7fbbeac4aeeed6 Template:Multiple issues 10 950 1898 1897 2023-07-15T17:58:19Z Richard Robin 2 已从[[:wikipedia:Template:Multiple_issues]]导入1个版本 wikitext text/x-wiki {{ {{{|safesubst:}}}#invoke:Unsubst||$B= {{Ambox |name = Multiple issues |templatestyles = Multiple issues/styles.css |doc = no |subst = <includeonly>{{subst:substcheck}}</includeonly> |class = ambox-multiple_issues compact-ambox |type = content |removalnotice = yes <!-- as of 2016-06, param does not work on this template --> |cat=Articles with multiple maintenance issues |text = <div class="multiple-issues-text {{#if:{{{1|}}}|mw-collapsible {{#ifeq:{{{collapsed}}}|yes|mw-collapsed}}}}"><!-- -->'''This {{#if:{{{section|}}}|section|article}} has multiple issues.''' Please help '''[{{fullurl:{{FULLPAGENAME}}|action=edit}} improve it]''' or discuss these issues on the '''[[{{TALKPAGENAME}}|talk page]]'''. <small>''([[Help:Maintenance template removal|Learn how and when to remove these template messages]])''</small> {{#if:{{{1|}}} | <div class="mw-collapsible-content"> {{#invoke:String|replace|source={{{1|}}}|pattern=style="display: none"|replace=|count=}}<!--remove style="display: none", to support display of {{orphan}} messages in {{multiple issues}}--> </div> | <includeonly>{{error|No issues specified. Please specify issues, or remove this template.}}</includeonly> }} </div> {{#if:{{{2|}}}|[[Category:Pages using multiple issues with unknown parameters|§{{PAGENAME}}]]}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using multiple issues with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Multiple issues]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | collapsed | section }} }}<noinclude> {{Documentation}} </noinclude> 901c03957b27f754d3caf69d5c74740f793c9a03 Template:Multiple issues/styles.css 10 951 1900 1899 2023-07-15T17:58:20Z Richard Robin 2 已从[[:wikipedia:Template:Multiple_issues/styles.css]]导入1个版本 sanitized-css text/css /* {{pp|small=y}} */ .multiple-issues-text { width: 95%; margin: 0.2em 0; } .multiple-issues-text > .mw-collapsible-content { margin-top: 0.3em; } /* Remove borders, backgrounds, padding, etc. */ .compact-ambox .ambox { border: none; border-collapse: collapse; background-color: transparent; margin: 0 0 0 1.6em !important; padding: 0 !important; width: auto; display: block; } body.mediawiki .compact-ambox .ambox.mbox-small-left { font-size: 100%; width: auto; margin: 0; } /* Style the text cell as a list item and remove its padding */ .compact-ambox .ambox .mbox-text { padding: 0 !important; margin: 0 !important; } .compact-ambox .ambox .mbox-text-span { display: list-item; line-height: 1.5em; list-style-type: disc; } /* Hide the images */ .compact-ambox .ambox .mbox-image, .compact-ambox .ambox .mbox-imageright, .compact-ambox .ambox .mbox-empty-cell, /* Allow for hiding text in compact form */ .compact-ambox .hide-when-compact { display: none; } e90883916010fd38cd4f9c7e10c4a01908c965cb Module:Unsubst 828 952 1902 1901 2023-07-15T17:58:20Z Richard Robin 2 已从[[:wikipedia:Module:Unsubst]]导入1个版本 Scribunto text/plain local checkType = require('libraryUtil').checkType local p = {} local BODY_PARAM = '$B' local specialParams = { ['$params'] = 'parameter list', ['$aliases'] = 'parameter aliases', ['$flags'] = 'flags', ['$B'] = 'template content', ['$template-name'] = 'template invocation name override', } function p.main(frame, body) -- If we are substing, this function returns a template invocation, and if -- not, it returns the template body. The template body can be specified in -- the body parameter, or in the template parameter defined in the -- BODY_PARAM variable. This function can be called from Lua or from -- #invoke. -- Return the template body if we aren't substing. if not mw.isSubsting() then if body ~= nil then return body elseif frame.args[BODY_PARAM] ~= nil then return frame.args[BODY_PARAM] else error(string.format( "no template content specified (use parameter '%s' from #invoke)", BODY_PARAM ), 2) end end -- Sanity check for the frame object. if type(frame) ~= 'table' or type(frame.getParent) ~= 'function' or not frame:getParent() then error( "argument #1 to 'main' must be a frame object with a parent " .. "frame available", 2 ) end -- Find the invocation name. local mTemplateInvocation = require('Module:Template invocation') local name if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then name = frame.args['$template-name'] -- override whatever the template name is with this name else name = mTemplateInvocation.name(frame:getParent():getTitle()) end -- Combine passed args with passed defaults local args = {} if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then for k, v in pairs( frame:getParent().args ) do args[k] = v end for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end else for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end for k, v in pairs( frame:getParent().args ) do args[k] = v end end -- Trim parameters, if not specified otherwise if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end end -- Pull information from parameter aliases local aliases = {} if frame.args['$aliases'] then local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' ) for k, v in ipairs( list ) do local tmp = mw.text.split( v, '%s*>%s*' ) aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2]) end end for k, v in pairs( aliases ) do if args[k] and ( not args[v] or args[v] == '' ) then args[v] = args[k] end args[k] = nil end -- Remove empty parameters, if specified if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then local tmp = 0 for k, v in ipairs( args ) do if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then tmp = k else break end end for k, v in pairs( args ) do if v == '' then if not (type(k) == 'number' and k < tmp) then args[k] = nil end end end end -- Order parameters if frame.args['$params'] then local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {} for k, v in ipairs(params) do v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v if args[v] then tmp[v], args[v] = args[v], nil end end for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end args = tmp end return mTemplateInvocation.invocation(name, args) end p[''] = p.main -- For backwards compatibility return p 7f01ffc8aa2ac4a4772f14c12e0b77e384ecabb6 Module:Infobox 828 953 1904 1903 2023-07-15T17:58:23Z Richard Robin 2 已从[[:wikipedia:Module:Infobox]]导入1个版本 Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if args.decat == 'yes' then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p 0ddb7e5c8426d67cd589b710efb9912ddfb67fea Module:Infobox/styles.css 828 954 1906 1905 2023-07-15T17:58:24Z Richard Robin 2 已从[[:wikipedia:Module:Infobox/styles.css]]导入1个版本 sanitized-css text/css /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; } .infobox-3cols-child { margin: auto; } .infobox .navbar { font-size: 100%; } /* T281642 */ body.skin-minerva .infobox-header, body.skin-minerva .infobox-subheader, body.skin-minerva .infobox-above, body.skin-minerva .infobox-title, body.skin-minerva .infobox-image, body.skin-minerva .infobox-full-data, body.skin-minerva .infobox-below { text-align: center; } e8de6d96f4fde53afc4a6b0fed534405ab59b0a7 Template:Tlx 10 843 1908 1648 2023-07-15T17:58:26Z Richard Robin 2 已从[[:wikipedia:Template:Tlx]]导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:Template link expanded]] 155e901040104f96908f1f4627c4eb3501301bf9 Template:Template link expanded 10 842 1910 1644 2023-07-15T17:58:27Z Richard Robin 2 已从[[:wikipedia:Template:Template_link_expanded]]导入1个版本 wikitext text/x-wiki <code><nowiki>{{</nowiki>{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}<!-- -->[[{{{sister|{{{SISTER|}}}}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!-- -->{{#if:{{{2|}}} |&#124;{{{2}}}}}<!-- -->{{#if:{{{3|}}} |&#124;{{{3}}}}}<!-- -->{{#if:{{{4|}}} |&#124;{{{4}}}}}<!-- -->{{#if:{{{5|}}} |&#124;{{{5}}}}}<!-- -->{{#if:{{{6|}}} |&#124;{{{6}}}}}<!-- -->{{#if:{{{7|}}} |&#124;{{{7}}}}}<!-- -->{{#if:{{{8|}}} |&#124;{{{8}}}}}<!-- -->{{#if:{{{9|}}} |&#124;{{{9}}}}}<!-- -->{{#if:{{{10|}}} |&#124;{{{10}}}}}<!-- -->{{#if:{{{11|}}} |&#124;{{{11}}}}}<!-- -->{{#if:{{{12|}}} |&#124;{{{12}}}}}<!-- -->{{#if:{{{13|}}} |&#124;{{{13}}}}}<!-- -->{{#if:{{{14|}}} |&#124;{{{14}}}}}<!-- -->{{#if:{{{15|}}} |&#124;{{{15}}}}}<!-- -->{{#if:{{{16|}}} |&#124;{{{16}}}}}<!-- -->{{#if:{{{17|}}} |&#124;{{{17}}}}}<!-- -->{{#if:{{{18|}}} |&#124;{{{18}}}}}<!-- -->{{#if:{{{19|}}} |&#124;{{{19}}}}}<!-- -->{{#if:{{{20|}}} |&#124;{{{20}}}}}<!-- -->{{#if:{{{21|}}} |&#124;''...''}}<!-- --><nowiki>}}</nowiki></code><noinclude> {{Documentation}} </noinclude> 9f670205d4b358df089b1a820f78f02a88afca3a Template:Block indent 10 955 1912 1911 2023-07-15T17:58:27Z Richard Robin 2 已从[[:wikipedia:Template:Block_indent]]导入1个版本 wikitext text/x-wiki <templatestyles src="Block indent/styles.css"/><div class="block-indent {{{class|}}}" {{#if:{{{left|}}}{{{em|}}}{{{right|}}}{{{style|}}}|style="{{#if:{{{left|{{{em|}}}}}}|padding-left: {{{left|{{{em}}}}}}em;}}{{#if:{{{right|}}}|padding-right: {{{right}}}em;}}{{#if:{{{style|}}}|{{{style}}}}}"}}>{{{1|{{{text|{{{content|{{{quote|<noinclude>{{lorem ipsum}}</noinclude><includeonly>{{error|Error: No content given to indent (or equals sign used in the actual argument to an unnamed parameter)}}</includeonly>}}}}}}}}}}}}</div><noinclude> {{documentation}} </noinclude> f1e4d04c02e97bfe86521e96e8265e947e574340 Template:Block indent/styles.css 10 956 1914 1913 2023-07-15T17:58:28Z Richard Robin 2 已从[[:wikipedia:Template:Block_indent/styles.css]]导入1个版本 sanitized-css text/css /* {{pp|small=yes}} */ .block-indent { padding-left: 3em; padding-right: 0; overflow: hidden; } c89721fb334bfbd775783b44641a3466b6748d6b Template:Infobox 10 957 1916 1915 2023-07-15T17:58:28Z Richard Robin 2 已从[[:wikipedia:Template:Infobox]]导入1个版本 wikitext text/x-wiki {{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude> {{documentation}} <!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --> </noinclude> 817a9f5b6524eced06a57bd1d5fd7179f9369bf2 Template:POV 10 958 1918 1917 2023-07-15T17:58:29Z Richard Robin 2 已从[[:wikipedia:Template:POV]]导入1个版本 wikitext text/x-wiki {{ safesubst:<noinclude/>#invoke:Unsubst||date=__DATE__ |$B= <!--{{POV}} begin-->{{Ambox | name = POV | subst = <includeonly>{{subst:substcheck}}</includeonly> | small = {{{small|}}} | type = content | class = ambox-POV | style = {{{style|}}} | image = [[File:Unbalanced scales.svg|50x40px|link=]] | issue = The '''[[Wikipedia:Neutral point of view|neutrality]] of this {{{what|article}}} is [[Wikipedia:NPOV dispute|disputed]]'''. | talk = {{{talk|#}}} | fix = Please do not remove this message until [[Template:POV#When to remove|conditions to do so are met]]. | removalnotice = yes | date = {{{date|}}} | cat = Wikipedia neutral point of view disputes | all = All Wikipedia neutral point of view disputes }}<!--{{POV}} end--> }}<noinclude> {{Documentation}} </noinclude> e8c041c852b18976809007fd683af9617ab6dacb Template:Em 10 959 1920 1919 2023-07-15T17:58:32Z Richard Robin 2 已从[[:wikipedia:Template:Em]]导入1个版本 wikitext text/x-wiki <em {{#if:{{{role|}}}|role="{{{role}}}"}} {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</em><noinclude> {{documentation}} <!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --> </noinclude> e2fac6fb507a0dd72c4e79d02403049c7d857c8d Template:Hidden begin 10 960 1922 1921 2023-07-15T17:58:32Z Richard Robin 2 已从[[:wikipedia:Template:Hidden_begin]]导入1个版本 wikitext text/x-wiki <includeonly><templatestyles src="Template:Hidden begin/styles.css"/><div class="hidden-begin mw-collapsible {{#ifeq:{{{showhide|{{{toggle}}}}}}|left|mw-collapsible-leftside-toggle}} {{#if:{{{expanded|}}}||mw-collapsed}} {{{class|}}}" style="{{#if:{{{width|}}}|width:{{{width}}};}} {{#if:{{{border|}}}|border:{{{border}}};}} {{#if:{{{bgcolor|}}}|background-color:{{{bgcolor}}};}} {{{style|}}}"><!-- --><div class="hidden-title" style="{{#if:{{{ta1|}}}|text-align:{{{ta1}}};}} {{#if:{{{titlebgcolor|}}}|background-color:{{{titlebgcolor}}};}} {{{titlestyle|}}}">{{{title|{{{header|}}}}}}</div><!-- --><div class="hidden-content mw-collapsible-content" style="{{#if:{{{ta2|}}}|text-align:{{{ta2}}};}} {{#if:{{{contentbgcolor|}}}|background-color:{{{contentbgcolor}}};}} {{{contentstyle|{{{bodystyle|}}}}}}"><!-- Content added after the template --></includeonly><noinclude> {{Documentation}} </noinclude> be0f4e092203b931810fbff9ed6a1b7af51c025f Template:Hidden end 10 961 1924 1923 2023-07-15T17:58:33Z Richard Robin 2 已从[[:wikipedia:Template:Hidden_end]]导入1个版本 wikitext text/x-wiki <includeonly></div></div></includeonly><noinclude> {{hatnote|Templates {{noredirect|Template:End hidden|End hidden}} and {{noredirect|Template:End hidden section|End hidden section}} redirect here.}} {{Documentation|Template:Hidden begin/doc}} </noinclude> 6cc7eb4776ef10092d5f7d48da123117e7b430b2 Template:Str left 10 962 1926 1925 2023-07-15T17:58:33Z Richard Robin 2 已从[[:wikipedia:Template:Str_left]]导入1个版本 wikitext text/x-wiki <includeonly>{{safesubst:padleft:|{{{2|1}}}|{{{1}}}}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 2048b0d7b35e156528655b1d090e8b5ffab3f400 Template:Citation style 10 963 1928 1927 2023-07-15T17:58:34Z Richard Robin 2 已从[[:wikipedia:Template:Citation_style]]导入1个版本 wikitext text/x-wiki {{ safesubst:<noinclude/>#invoke:Unsubst||date=__DATE__ |$B= <!--{{Citation style}} begin-->{{Ambox | name = Citation style | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = style | small = {{{small|}}} | class = ambox-citation_style | sect = {{{1|}}} | issue = '''has an unclear citation style'''. {{#if:{{{reason|{{{details|}}}}}}|The reason given is: '''{{Terminate sentence|{{{reason|{{{details}}}}}}}}'''}} | fix = The references used may be made clearer with a different or consistent style of [[Wikipedia:Citing sources|citation]] and [[Help:Footnotes|footnoting]]. | cat = Wikipedia references cleanup | all = All articles needing references cleanup | cat2 = Articles covered by WikiProject Wikify | all2 = All articles covered by WikiProject Wikify | date = {{{date|}}} | removalnotice = yes }}<!--{{Citation style}} end--> }}<noinclude> {{Documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude> ffdf9d833ab08e004e41c1c6da5fde056385ee2f Template:Section link 10 964 1930 1929 2023-07-15T17:58:34Z Richard Robin 2 已从[[:wikipedia:Template:Section_link]]导入1个版本 wikitext text/x-wiki {{#invoke:Section link|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 8d047e5845f8a9b74a4655b5dd79ca7595a8f88b Module:Section link 828 965 1932 1931 2023-07-15T17:58:34Z Richard Robin 2 已从[[:wikipedia:Module:Section_link]]导入1个版本 Scribunto text/plain -- This module implements {{section link}}. require('strict'); local checkType = require('libraryUtil').checkType local p = {} local function makeSectionLink(page, section, display) display = display or section page = page or '' -- MediaWiki doesn't allow these in `page`, so only need to do for `section` if type(section) == 'string' then section = string.gsub(section, "{", "&#x7B;") section = string.gsub(section, "}", "&#x7D;") end return string.format('[[%s#%s|%s]]', page, section, display) end local function normalizeTitle(title) title = mw.ustring.gsub(mw.ustring.gsub(title, "'", ""), '"', '') title = mw.ustring.gsub(title, "%b<>", "") return mw.title.new(title).prefixedText end function p._main(page, sections, options, title) -- Validate input. checkType('_main', 1, page, 'string', true) checkType('_main', 3, options, 'table', true) if sections == nil then sections = {} elseif type(sections) == 'string' then sections = {sections} elseif type(sections) ~= 'table' then error(string.format( "type error in argument #2 to '_main' " .. "(string, table or nil expected, got %s)", type(sections) ), 2) end options = options or {} title = title or mw.title.getCurrentTitle() -- Deal with blank page names elegantly if page and not page:find('%S') then page = nil options.nopage = true end -- Make the link(s). local isShowingPage = not options.nopage if #sections <= 1 then local linkPage = page or '' local section = sections[1] or 'Notes' local display = '§&nbsp;' .. section if isShowingPage then page = page or title.prefixedText if options.display and options.display ~= '' then if normalizeTitle(options.display) == normalizeTitle(page) then display = options.display .. ' ' .. display else error(string.format( 'Display title "%s" was ignored since it is ' .. "not equivalent to the page's actual title", options.display ), 0) end else display = page .. ' ' .. display end end return makeSectionLink(linkPage, section, display) else -- Multiple sections. First, make a list of the links to display. local ret = {} for i, section in ipairs(sections) do ret[i] = makeSectionLink(page, section) end -- Assemble the list of links into a string with mw.text.listToText. -- We use the default separator for mw.text.listToText, but a custom -- conjunction. There is also a special case conjunction if we only -- have two links. local conjunction if #sections == 2 then conjunction = '&#8203; and ' else conjunction = ', and ' end ret = mw.text.listToText(ret, nil, conjunction) -- Add the intro text. local intro = '§§&nbsp;' if isShowingPage then intro = (page or title.prefixedText) .. ' ' .. intro end ret = intro .. ret return ret end end function p.main(frame) local yesno = require('Module:Yesno') local args = require('Module:Arguments').getArgs(frame, { wrappers = 'Template:Section link', valueFunc = function (key, value) value = value:match('^%s*(.-)%s*$') -- Trim whitespace -- Allow blank first parameters, as the wikitext template does this. if value ~= '' or key == 1 then return value end end }) for k, v in pairs(args) do -- replace underscores in the positional parameter values if 'number' == type(k) then if not yesno (args['keep-underscores']) then -- unless |keep-underscores=yes args[k] = mw.uri.decode (v, 'WIKI'); -- percent-decode; replace underscores with space characters else args[k] = mw.uri.decode (v, 'PATH'); -- percent-decode; retain underscores end end end -- Sort the arguments. local page local sections, options = {}, {} for k, v in pairs(args) do if k == 1 then -- Doing this in the loop because of a bug in [[Module:Arguments]] -- when using pairs with deleted arguments. page = mw.text.decode(v, true) elseif type(k) == 'number' then sections[k] = v else options[k] = v end end options.nopage = yesno (options.nopage); -- make boolean -- Extract section from page, if present if page then local p, s = page:match('^(.-)#(.*)$') if p then page, sections[1] = p, s end end -- Compress the sections array. local function compressArray(t) local nums, ret = {}, {} for num in pairs(t) do nums[#nums + 1] = num end table.sort(nums) for i, num in ipairs(nums) do ret[i] = t[num] end return ret end sections = compressArray(sections) return p._main(page, sections, options) end return p 5cc61d43dc601ca43e9472500fc5cd09ca7cea44 Template:Advert 10 966 1934 1933 2023-07-15T17:58:36Z Richard Robin 2 已从[[:wikipedia:Template:Advert]]导入1个版本 wikitext text/x-wiki <noinclude>{{redirect|Template:AD|the [[calendar era]] template|Template:CE}}</noinclude>{{SAFESUBST:<noinclude />#invoke:Unsubst||date=__DATE__ |$B= {{Ambox | name = Advert | type = content | class= ambox-Advert | issue= This {{{1|article}}} '''contains content that is written like [[Wikipedia:What Wikipedia is not#Wikipedia is not a soapbox or means of promotion|{{#if:{{{2|{{{type|}}}}}}|{{{2|{{{type}}}}}}|an advertisement}}]]'''. | fix = Please help [{{fullurl:{{FULLPAGENAME}}|action=edit}} improve it] by removing [[WP:Spam|promotional content]] and inappropriate [[Wikipedia:External_links#Advertising_and_conflicts_of_interest|external links]], and by adding encyclopedic content written from a [[Wikipedia:Neutral point of view|neutral point of view]]. | removalnotice = yes | cat = Articles with a promotional tone | date = {{{date|}}} | all = All articles with a promotional tone }} }}<noinclude> {{documentation}} </noinclude> 503795cf9361b12bcaed584d6fafb2cc04c11b57 Template:Template link general 10 967 1936 1935 2023-07-15T17:58:36Z Richard Robin 2 已从[[:wikipedia:Template:Template_link_general]]导入1个版本 wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:Template link general|main}}<noinclude> {{Documentation}} </noinclude> 9871d2f490eaedd832a0ae8016adbf807ddf7b71 Template:Template link with alternate text 10 968 1938 1937 2023-07-15T17:58:37Z Richard Robin 2 已从[[:wikipedia:Template:Template_link_with_alternate_text]]导入1个版本 wikitext text/x-wiki {{Tlg|subst={{{subst|}}}|nowrap={{{nowrap|}}}|{{{1|}}}<!-- -->|alttext{{#ifeq:{{{2}}}|{{{2|x}}}||x}}={{{2}}}<!-- -->|3{{#ifeq:{{{3}}}|{{{3|x}}}||x}}={{{3}}}<!-- -->|4{{#ifeq:{{{4}}}|{{{4|x}}}||x}}={{{4}}}<!-- -->|5{{#ifeq:{{{5}}}|{{{5|x}}}||x}}={{{5}}}<!-- -->|6{{#ifeq:{{{6}}}|{{{6|x}}}||x}}={{{6}}}<!-- -->|7{{#ifeq:{{{7}}}|{{{7|x}}}||x}}={{{7}}}<!-- -->|8{{#ifeq:{{{8}}}|{{{8|x}}}||x}}={{{8}}}<!-- -->|9{{#ifeq:{{{9}}}|{{{9|x}}}||x}}={{{9}}}<!-- -->|10{{#ifeq:{{{10}}}|{{{10|x}}}||x}}={{{10}}}<!-- -->|11{{#ifeq:{{{11}}}|{{{11|x}}}||x}}={{{11}}}<!-- -->|12{{#ifeq:{{{12}}}|{{{12|x}}}||x}}={{{12}}}}}<noinclude> {{Documentation}} </noinclude> 7caf0bb11d2f63149bfc961432b7cf4a05b02cad Template:Tla 10 969 1940 1939 2023-07-15T17:58:37Z Richard Robin 2 已从[[:wikipedia:Template:Tla]]导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:Template link with alternate text]] {{Redirect category shell| {{R from move}} }} 5705a62c7a5cc85e5377bd4b550ebeb0cc5b10fa Template:Tlg 10 970 1942 1941 2023-07-15T17:58:37Z Richard Robin 2 已从[[:wikipedia:Template:Tlg]]导入1个版本 wikitext text/x-wiki #REDIRECT [[Template:Template link general]] {{Redirect category shell| {{R from move}} }} 707ce913a3ffa8193c9377c3ded7db7b72407500 Template:View 10 971 1944 1943 2023-07-15T17:58:38Z Richard Robin 2 已从[[:wikipedia:Template:View]]导入1个版本 wikitext text/x-wiki {{#invoke:navbar|navbar|plain = 1|template = {{{template|{{{1|}}}}}}}}<noinclude> {{Documentation|Template:Navbar/doc}} </noinclude> 1ca014f2b7724c60659a51b385a22ce31f318f86 Template:Underlinked 10 972 1946 1945 2023-07-15T17:58:39Z Richard Robin 2 已从[[:wikipedia:Template:Underlinked]]导入1个版本 wikitext text/x-wiki {{ safesubst:<noinclude/>#invoke:Unsubst||date=__DATE__ |$B= <!--{{Underlinked}} begin-->{{Ambox | name = Underlinked | type = style | image = [[File:Ambox wikify.svg|50x40px|link=|alt=]] | issue = This {{{1|article}}} '''needs more [[Wikipedia:Manual of Style/Linking|links to other articles]] to help [[Wikipedia:Manual of Style/Linking#Principles|integrate it into the encyclopedia]]'''. | fix = Please help [{{fullurl:{{FULLPAGENAME}}|action=edit}} improve this article] by adding links [[Wikipedia:Manual of Style/Linking#Overlinking and underlinking|that are relevant to the context]] within the existing text. | removalnotice = yes | date = {{{date|}}} | cat = Articles with too few wikilinks | all = All articles with too few wikilinks | cat2 = Articles covered by WikiProject Wikify | all2 = All articles covered by WikiProject Wikify }}<!--{{Underlinked}} end--> }}<noinclude> {{Documentation}} </noinclude> 91b612fd89e6e3fdf0b30df492c6a9e2b83f3449 Template:Mbox templates see also 10 973 1948 1947 2023-07-15T17:58:40Z Richard Robin 2 已从[[:wikipedia:Template:Mbox_templates_see_also]]导入1个版本 wikitext text/x-wiki <div>{{view|Template:Mbox templates see also|edit|brackets=yes}} There are seven metatemplates in the [[Module:Message box]] family:</div> * {{tl|Ambox}}, for messageboxes on article pages. * {{tl|Cmbox}}, for messageboxes on category pages. * {{tl|Imbox}}, for messageboxes on file (image) pages. * {{tl|Tmbox}}, for messageboxes on talk pages. * {{tl|Fmbox}}, for header and footer messageboxes. * {{tl|Ombox}}, for messageboxes on other types of page. * {{tl|Mbox}}, for messageboxes that are used in different [[Wikipedia:Namespace|namespaces]] and change their presentation accordingly. Closely related metatemplates: * {{tl|Asbox}}, for messageboxes in article stubs. * {{tl|Dmbox}}, for messageboxes on disambiguation or set-index pages. * {{tla|Ivory messagebox|Ivmbox}}, a simple full-width box with default ivory background intended to frame important messages or notices.<noinclude> {{Documentation}} </noinclude> bb802665b65c4908f4fea71ac8ca65ef82ff71c8 Module:Transclusion count/data/A 828 974 1950 1949 2023-07-15T17:58:41Z Richard Robin 2 已从[[:wikipedia:Module:Transclusion_count/data/A]]导入1个版本 Scribunto text/plain return { ["A-Class"] = 5800, ["AARTalk"] = 8900, ["ACArt"] = 5300, ["AFB_game_box_end"] = 2400, ["AFB_game_box_start"] = 2500, ["AFC_comment"] = 14000, ["AFC_submission"] = 25000, ["AFC_submission_category_header"] = 4600, ["AFD_help"] = 103000, ["AFD_help/styles.css"] = 103000, ["AFI/Picture_box/show_picture"] = 3600, ["AFI_film"] = 7900, ["AFL_Car"] = 2600, ["AFL_Col"] = 2400, ["AFL_Ess"] = 2500, ["AFL_Gee"] = 2500, ["AFL_Haw"] = 2300, ["AFL_Mel"] = 2700, ["AFL_NM"] = 2200, ["AFL_Ric"] = 2400, ["AFL_StK"] = 2900, ["AFL_Tables"] = 11000, ["AFL_Year"] = 2500, ["ALG"] = 2400, ["AMARB"] = 4500, ["AML"] = 4500, ["AMQ"] = 4600, ["AM_station_data"] = 4400, ["ARG"] = 6300, ["ASIN"] = 4500, ["ASN"] = 3400, ["ATP"] = 5000, ["AUS"] = 14000, ["AUT"] = 9400, ["AZE"] = 2500, ["A_note"] = 4200, ["A_or_an"] = 29000, ["Aan"] = 45000, ["Abbr"] = 783000, ["Abbreviation"] = 2300, ["Abbrlink"] = 17000, ["Abot"] = 10000, ["About"] = 151000, ["Absolute_page_title"] = 2400, ["Acad"] = 6400, ["Access_icon"] = 2600, ["According_to_whom"] = 4200, ["AchievementTable"] = 10000, ["Active_politician"] = 20000, ["AdSenseSummary"] = 4100, ["Added"] = 2400, ["Adjacent_communities"] = 26000, ["Adjacent_stations"] = 38000, ["Adjacent_stations/styles.css"] = 38000, ["Adjstn"] = 2000, ["Admin"] = 13000, ["Administrator_note"] = 6500, ["Adminnote"] = 3500, ["Advert"] = 19000, ["Aet"] = 5000, ["AfC_age_category"] = 4100, ["AfC_comment"] = 14000, ["AfC_date_category"] = 189000, ["AfC_status/age"] = 4100, ["AfC_status/backlog"] = 4700, ["AfC_submission"] = 39000, ["AfC_submission/comments"] = 24000, ["AfC_submission/declined"] = 24000, ["AfC_submission/declinedivbox"] = 24000, ["AfC_submission/draft"] = 18000, ["AfC_submission/helptools"] = 42000, ["AfC_submission/pending"] = 4100, ["AfC_submission/tools"] = 4100, ["AfC_submission_category_header"] = 5600, ["AfC_submission_category_header/day"] = 5400, ["AfC_submission_category_header/td"] = 5400, ["AfC_talk/C_percentage"] = 3000, ["AfC_topic"] = 26000, ["AfD_categories_horizontal_shortnames"] = 4300, ["AfD_count_link"] = 3800, ["Afd-merged-from"] = 7800, ["AfricaProject"] = 28000, ["Africa_topic"] = 6200, ["After_extra_time"] = 5000, ["Age"] = 37000, ["Age_in_days"] = 4300, ["Age_in_years"] = 3700, ["Age_in_years,_months,_weeks_and_days"] = 4000, ["Age_in_years,_months_and_days"] = 17000, ["Age_in_years_and_days"] = 3900, ["Age_in_years_and_days_nts"] = 3000, ["Agree"] = 2100, ["Ahnentafel"] = 8300, ["Ahnentafel/styles.css"] = 8300, ["Air_Force_Historical_Research_Agency"] = 4300, ["Air_force"] = 5900, ["Air_force/core"] = 5900, ["Aircontent"] = 9400, ["Aircraft_specs"] = 12000, ["Aircraft_specs/convert"] = 12000, ["Aircraft_specs/eng"] = 12000, ["Aircraft_specs/length"] = 12000, ["Aircraft_specs/range"] = 12000, ["Aircraft_specs/speed"] = 12000, ["Airport-dest-list"] = 3600, ["Airport_codes"] = 15000, ["Airport_destination_list"] = 4900, ["Al"] = 64000, ["Album"] = 202000, ["Album_chart"] = 29000, ["Album_chart/chartnote"] = 29000, ["Album_cover_fur"] = 53000, ["Album_label_category"] = 2200, ["Album_label_category/core"] = 2200, ["Album_ratings"] = 77000, ["Album_reviews"] = 5700, ["Albums"] = 7300, ["Albums_category"] = 24000, ["Albums_category/core"] = 24000, ["Albums_category/type/default"] = 24000, ["Align"] = 170000, ["Aligned_table"] = 13000, ["AllIrelandByCountyCatNav"] = 3100, ["AllMovie_name"] = 5700, ["AllMovie_title"] = 28000, ["AllMusic"] = 77000, ["Allcaps"] = 8800, ["Allcaps/styles.css"] = 8800, ["Allmovie"] = 4300, ["Allmovie_title"] = 2300, ["Allmusic"] = 17000, ["Allow_wrap"] = 19000, ["Alumni"] = 2300, ["Always_substitute"] = 8000, ["Ambox"] = 1460000, ["Ambox_globe"] = 35000, ["Ambox_globe_current_red"] = 33000, ["American_English"] = 17000, ["American_football_roster/Footer"] = 3100, ["American_football_roster/Header"] = 3100, ["American_football_roster/Player"] = 3100, ["Americanfootballbox"] = 3100, ["Amg_movie"] = 12000, ["Amg_name"] = 3200, ["Anarchism_announcements"] = 3100, ["Anarchism_announcements/shell"] = 3100, ["Anchor"] = 76000, ["Angbr"] = 2000, ["Angbr_IPA"] = 2300, ["Angle_bracket"] = 3100, ["Anglican_navbox_titlestyle"] = 14000, ["Anglicise_rank"] = 565000, ["Animal_tasks"] = 18000, ["Anime_News_Network"] = 11000, ["Ann"] = 4900, ["Annotated_link"] = 7300, ["Annual_readership"] = 51000, ["Anonblock"] = 32000, ["Antonym_of_(dis)establish"] = 8700, ["Apostrophe"] = 75000, ["ArbCom_Arab-Israeli_editnotice"] = 2100, ["ArbCom_Arab-Israeli_enforcement"] = 3000, ["Arbitration_Committee_candidate/data"] = 76000, ["Archive"] = 154000, ["Archive-nav"] = 5800, ["Archive_bottom"] = 44000, ["Archive_box"] = 18000, ["Archive_list"] = 69000, ["Archive_navigation"] = 7400, ["Archive_top"] = 26000, ["Archive_top/styles.css"] = 26000, ["Archivebottom"] = 3600, ["Archivebox"] = 2500, ["Archives"] = 49000, ["Archivetop"] = 3600, ["Army"] = 15000, ["Army/core"] = 15000, ["Art_UK_bio"] = 2400, ["Art_UK_bio/plural"] = 2400, ["Article"] = 2900, ["ArticleHistory"] = 29000, ["Article_alerts_box"] = 3600, ["Article_alerts_box/styles.css"] = 3600, ["Article_for_improvement_banner/Picture_box"] = 3700, ["Article_for_improvement_banner/Picture_box/show_picture"] = 3600, ["Article_history"] = 47000, ["Articles_by_Quality"] = 2300, ["Articles_by_Quality/down"] = 2300, ["Articles_by_Quality/total"] = 2300, ["Articles_by_Quality/up"] = 2300, ["As_of"] = 78000, ["Asbox"] = 2390000, ["Asbox/styles.css"] = 2390000, ["Asia_topic"] = 9900, ["Asof"] = 7600, ["Assessed-Class"] = 18000, ["Assignment"] = 6100, ["Assignment_milestones"] = 5400, ["AstDys"] = 2900, ["Asterisk"] = 2100, ["AthAbbr"] = 4100, ["Atnhead"] = 6000, ["Atop"] = 4500, ["Attached_KML"] = 13000, ["Au"] = 2100, ["AuEduNewbie"] = 2500, ["Audio"] = 27000, ["Audio_sample"] = 2900, ["AustralianFootball"] = 7400, ["Australian_Dictionary_of_Biography"] = 2400, ["Australian_English"] = 2700, ["Australian_party_style"] = 6000, ["Australian_politics/name"] = 4200, ["Australian_politics/party_colours"] = 6100, ["Austria_metadata_Wikidata"] = 2100, ["Austria_population_Wikidata"] = 2100, ["Aut"] = 8200, ["Authority_control"] = 2010000, ["Authority_control_(arts)"] = 16000, ["Auto_link"] = 79000, ["Autobiography"] = 2100, ["Automated_tools"] = 88000, ["Automated_tools/core"] = 88000, ["Automatic_Taxobox"] = 2600, ["Automatic_archive_navigator"] = 128000, ["Automatic_taxobox"] = 74000, ["Aviation_accidents_and_incidents"] = 2200, ["Awaiting_admin"] = 2600, ["Awaitingadmin"] = 2500, ["Award2"] = 2400, ["Awards"] = 2400, ["Awards_table"] = 5500, ["Awards_table/styles.css"] = 5500, ["Ayd"] = 2900, ["Aye"] = 25000, ["Module:A_or_an"] = 29000, ["Module:A_or_an/words"] = 29000, ["Module:About"] = 151000, ["Module:Adjacent_stations"] = 73000, ["Module:Adjacent_stations/Amtrak"] = 2400, ["Module:Adjacent_stations/Indian_Railways"] = 3200, ["Module:Adjacent_stations/JR_East"] = 2200, ["Module:Adjacent_stations/i18n"] = 73000, ["Module:AfC_submission_catcheck"] = 377000, ["Module:AfC_topic"] = 26000, ["Module:Age"] = 1170000, ["Module:Ahnentafel"] = 8300, ["Module:Airport_destination_list"] = 4900, ["Module:Aligned_dates_list"] = 2200, ["Module:Aligned_table"] = 13000, ["Module:Anchor"] = 76000, ["Module:Ancient_Egypt_era"] = 2800, ["Module:Ancient_Egypt_era/data"] = 2800, ["Module:Ancient_Egypt_kings"] = 2800, ["Module:Ancient_Egypt_kings/data"] = 2800, ["Module:Ancient_Olympiads"] = 2800, ["Module:Ancient_Olympiads/data"] = 2800, ["Module:Annotated_link"] = 7300, ["Module:Archive_list"] = 71000, ["Module:Arguments"] = 31400000, ["Module:Armenian"] = 2800, ["Module:Article_history"] = 47000, ["Module:Article_history/Category"] = 47000, ["Module:Article_history/config"] = 47000, ["Module:Article_history/styles.css"] = 46000, ["Module:Asbox"] = 2390000, ["Module:Asbox_stubtree"] = 36000, ["Module:Attached_KML"] = 13000, ["Module:Attached_KML/styles.css"] = 13000, ["Module:Australian_place_map"] = 16000, ["Module:Authority_control"] = 2020000, ["Module:Authority_control/auxiliary"] = 570000, ["Module:Authority_control/config"] = 2020000, ["Module:Automated_taxobox"] = 363000, ["Module:Automatic_archive_navigator"] = 128000, ["Module:Automatic_archive_navigator/config"] = 128000, ["Module:Autotaxobox"] = 565000, } cebaf1f2f535de9475a2f01167959c718cc0f616 Template:Ambox/doc 10 975 1952 1951 2023-07-15T17:58:41Z Richard Robin 2 已从[[:wikipedia:Template:Ambox/doc]]导入1个版本 wikitext text/x-wiki {{High-use}} {{Documentation subpage}} <!-- Please add categories to the /doc subpage, and interwikis at Wikidata (see Wikipedia:Wikidata) --> {{Lua|Module:Message box}} {{Mbox templates (small)}} {{tl|Ambox}} stands for '''A'''rticle '''m'''essage '''box''', which is a [[Help:Metatemplating|metatemplate]]. It is used to build message boxes for templates used in '''articles''', such as {{tl|underlinked}}. It offers several different colours, images and some other features. ==Basic usage== The box below shows the most common parameters that are accepted by {{Tl|Ambox}}. The purpose of each is described below. <syntaxhighlight lang="wikitext" style="overflow:auto;"> {{Ambox | name = | subst = <includeonly>{{subst:substcheck}}</includeonly> | small = {{{small|}}} | type = | image = | sect = {{{1|}}} | issue = | talk = {{{talk|}}} | fix = | date = {{{date|}}} | cat = | all = }} </syntaxhighlight> ==Full usage== {{Hidden begin |title=Full parameters| titlestyle = background:palegreen;}} The "All parameters" box shows all possible parameters for this template. However, it is not recommended to copy this, because it will never be required to use all parameters simultaneously. {| class="wikitable" align="left" style="background:transparent; width=30%;" !All parameters |- |<syntaxhighlight lang="wikitext" style="font-size:100%"> {{Ambox | name = | subst = <includeonly>{{subst:substcheck}}</includeonly> | small = {{{small|}}} | type = | image = | imageright = | smallimage = | smallimageright = | class = | style = | textstyle = | sect = {{{1|}}} | issue = | talk = {{{talk|}}} | fix = | date = {{{date|}}} | text = | smalltext = | plainlinks = no | removalnotice = | cat = | all = | cat2 = | all2 = | cat3 = | all3 = }} </syntaxhighlight> |} {{Hidden end}} {{clear}} ==Common parameters== === ''name'' === The ''name'' parameter specifies the name of the template, without the Template namespace prefix. For example {{Tl|Underlinked}} specifies {{Para|name|Underlinked}}. This parameter should be updated if the template is ever moved. The purpose of this parameter is twofold: * If incorrectly [[Wikipedia:Substitution|substituted]], it allows the meta-template to notify the name of the template which has been substituted, which may help editors to fix the problem. * It allows the template to have a more useful display on its template page, for example to show the date even when not specified, and to apply categorisation of the template itself. === ''subst'' === The ''subst'' parameter allows the meta-template to detect whether the template has been incorrectly substituted, and give an appropriate warning. It will also add such pages to [[:Category:Pages with incorrectly substituted templates]]. Just copy the code exactly as it appears in the box. === ''small'' === The ''small'' parameter should be passed through the template, as this will allow editors to use the small format by specifying {{para|small|left}} on an article: {{Ambox|nocat=true|small=left|text=This is the small left-aligned Ambox format.}} Otherwise the standard format will be produced: {{Ambox|nocat=true|text=This is the standard Ambox format.}} Other variations: * For templates which should ''never'' be small, specify {{Para|small|no}} or do not pass the small parameter at all. * For templates which should ''always'' be small, just specify {{Para|small|left}}. * For templates which should ''default to small'', try {{para|small|<nowiki>{{{small|left}}}</nowiki>}}. This will allow an editor to override by using {{para|small|no}} on an article. To use a small box that adjusts its width to match the text, use {{para|style|width: auto; margin-right: 0px;}} and {{para|textstyle|width: auto;}} together: {{Ambox|nocat=true|small=left|style=width: auto; margin-right: 0px;|textstyle=width: auto; margin-right: 0px;|text=This is the small left-aligned Ambox format with flexible width.}} See {{section link||sect}} below for more information on how to limit {{para|small}} display to cases when the template is being used for a section instead of the whole article (recommended, to prevent inconsistent top-of-article display). === ''type'' === The ''type'' parameter defines the colour of the left bar, and the image that is used by default. The type is chosen not on aesthetics but is based on the type of issue that the template describes. The seven available types and their default images are shown below. {{Ambox |nocat=true | type = speedy | text = type=<u>speedy</u> – Speedy deletion issues, such as {{tl|db-g1}} and {{tl|db-g3}}. }} {{Ambox |nocat=true | type = delete | text = type=<u>delete</u> – Deletion issues, such as {{tl|article for deletion}} and {{tl|proposed deletion}}. }} {{Ambox |nocat=true | type = content | text = type=<u>content</u> – Content issues, such as {{tl|POV}} and {{tl|globalize}}. }} {{Ambox |nocat=true | type = style | text = type=<u>style</u> – Style issues, such as {{tl|cleanup}} and {{tl|underlinked}}. }} {{ambox |nocat=true | type = notice | text = type=<u>notice</u> – Article notices, such as {{tl|current}} and {{tl|in use}}. }} {{Ambox |nocat=true | type = move | text = type=<u>move</u> – Merge, split and transwiki proposals, such as {{tl|split}} and {{tl|merge}}. }} {{Ambox |nocat=true | type = protection | text = type=<u>protection</u> – Protection notices, such as {{tl|pp-vandalism}} and {{tl|pp-protected}}. }} If no ''type'' parameter is given the template defaults to {{para|type|notice}}. === ''image'' === You can choose a specific image to use for the template by using the ''image'' parameter. Images are specified using the standard syntax for inserting files in Wikipedia (see [[Wikipedia:Manual of Style/Images#How to place an image]].) Widths of 40-50px are typical. For example: * {{Tl|POV}} specifies {{Para|image|<nowiki>[[File:Unbalanced scales.svg|40px|link=|alt=]]</nowiki>}} and looks like this: {{POV|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} * {{tl|underlinked}} specifies {{para|image|<nowiki>[[File:Ambox wikify.svg|50x40px|link=|alt=]]</nowiki>}} and looks like this: {{underlinked|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} Please note: * If no image is specified then the default image corresponding to the ''type'' is used. (See [[#type]] above.) * If {{para|image|none}} is specified, then no image is used and the text uses the whole message box area. * If an icon is [[Wikipedia:Alternative text for images#Purely decorative images|purely decorative]] and also in the [[Wikipedia:Image use policy#Public_domain|public domain]], [[Wikipedia:Manual of Style/Accessibility|accessibility]] can be improved by suppressing the link to the file page by adding "{{para|link}}{{para|alt}}" as seen above. === ''sect'' === Many article message templates begin with the text '''This article ...''' and it is often desirable that this wording change to '''This section ...''' if the template is used on a section instead. The value of this parameter will replace the word "article". Various possibilities for use include: {{para|sect|list}}, {{para|sect|table}}, {{para|sect|"In popular culture" material}}, etc. {{em|If using this feature, be sure to remove the first two words ("This article") from the template's text, otherwise it will be duplicated.}} A common way to facilitate this functionality is to pass {{para|sect|<nowiki>{{{1|}}}</nowiki>}}. This will allow editors to type <kbd>section</kbd>, for example, as the first unnamed parameter of the template to change the wording. For example, {{tlx|Advert|section}} produces: {{Advert|section|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} Another approach is to pass {{para|sect|<nowiki>{{{section|{{{sect|}}}}}}</nowiki>}} to provide a named value. Another is to use {{tlx|Yesno}} to parse the value for a positive, and pass {{para|sect|section}} if true. {{em|These approaches can be combined}}, and this is recommended. The following ready-to-use code: {{block indent|1=<code><nowiki>| sect = {{#ifeq:{{yesno|def=|1={{{sect|{{{section}}}}}} }}|yes|section|{{{sect|{{{section|{{{1|}}}}}}}}} }}</nowiki></code>}} enables the following: * Any positive value that {{tlx|Yesno}} can detect will be used with the named parameter in the ambox-based template to get "section" instead of "article": {{para|section|y}}, {{para|sect|True}}, etc. It is recommended to allow both {{para|sect}} and {{para|section}} so that editors do not have to guess which one will work. The sample code above does this for you. * Any other value passed, in any manner, will replace "article": {{para||section and its subsections}}, {{para|1|list}}, {{para|sect|section}}, {{para|section|table}}, etc. It is also advisable to restrict use of the {{para|small}} parameter so that it is made contingent upon the template being applied to a section (or whatever) rather than the whole article, to prevent the small version of the template being used at the top of the article where it would be inconsistent with other article-wide cleanup/dispute banners: {{block indent|1=<code><nowiki>| small = {{#if:{{{sect|{{{section|{{{1|}}}}}}}}}|{{#if:{{{small|{{{left|}}}}}}|left}} }}</nowiki></code>}} (In this case, any value of {{para|small}} or {{para|left}} will trigger the small, left display, as long as some value of {{para|sect}} or one of its aliases in that template has also been provided.) This code can be copy-pasted and used with the above code block. See, e.g., [[Template:Trivia]] and its [[Template:Trivia/testcases]] to observe the combined functionality. === ''issue'' and ''fix'' === The ''issue'' parameter is used to describe the issue with the article. Try to keep it short and to-the-point (approximately 10-20 words) and be sure to include a link to a relevant [[Wikipedia:Policies and guidelines|policy or guideline]]. The ''fix'' parameter contains some text which describes what should be done to improve the article. It may be longer than the text in ''issue'', but should not usually be more than two sentences. When the template is in its compact form (when placed inside {{tl|multiple issues}}) or small form (when using {{para|small|left}}), the ''issue'' is the only text that will be displayed. For example, {{Tl|Citation style}} defines * <syntaxhighlight lang="text" inline>|issue=This article '''has an unclear citation style'''.</syntaxhighlight> * <syntaxhighlight lang="text" inline>|fix=The references used may be made clearer with a different or consistent style of [[Wikipedia:Citing sources|citation]], [[Wikipedia:Footnotes|footnoting]], or [[Wikipedia:External links|external linking]].</syntaxhighlight> When used stand-alone it produces the whole text: {{Citation style|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} But when used inside {{Tl|Multiple issues}} or with {{Para|small|left}} it displays only the issue: {{Multiple issues <!-- Even though there's only one "issue", please don't remove this {{Multiple issues}} template. It is a demonstration of the formatting. --> |{{Citation style|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}}} {{Citation style|small=left|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} === ''talk'' === Some article message templates include a link to the talk page, and allow an editor to specify a section heading to link directly to the relevant section. To achieve this functionality, simply pass the ''talk'' parameter through, i.e. {{para|talk|<nowiki>{{{talk|}}}</nowiki>}} This parameter may then be used by an editor as follows: * {{para|talk|SECTION HEADING}} – the link will point to the specified section on the article's talk page, e.g. {{para|talk|Foo}} * {{para|talk|FULL PAGE NAME}} – the template will link to the page specified (which may include a [[Help:Link#Section linking (anchors)|section anchor]]), e.g. {{para|talk|Talk:Banana#Foo}} Notes: * When this parameter is used by a template, the talk page link will appear on the template itself (in order to demonstrate the functionality) but this will only display on articles if the parameter is actually defined. * In order to make sure there is always a link to the talk page, you can use {{para|talk|<nowiki>{{{talk|#}}}</nowiki>}}. * If the talk page does not exist, there will be no link, whatever the value of the parameter. === ''date'' === Passing the ''date'' parameter through to the meta-template means that the date that the article is tagged may be specified by an editor (or more commonly a [[Wikipedia:Bots|bot]]). This will be displayed after the message in a smaller font. Passing this parameter also enables [[:Category:Wikipedia maintenance categories sorted by month|monthly cleanup categorisation]] when the ''cat'' parameter is also defined. === ''info'' === This parameter is for specifying additional information. Whatever you add here will appear after the date, and will not be displayed if the template is being wrapped in {{tl|multiple issues}}. === ''removalnotice'' === If you specify {{para|removalnotice|yes}}, then the following notice will be displayed after the date and after the ''info'' text: * <small>[[Help:Maintenance template removal|Learn how and when to remove this template message]].</small> This will not be displayed if the template is being wrapped in {{tl|multiple issues}}. === ''cat'' === This parameter defines a monthly cleanup category. If {{para|cat|CATEGORY}} then: * articles will be placed in '''Category:CATEGORY from DATE''' if {{para|date|DATE}} is specified. * articles will be placed in '''Category:CATEGORY''' if the date is not specified. For example, {{Tl|No footnotes}} specifies {{Para|cat|Articles lacking in-text citations}} and so an article with the template {{Tlx|No footnotes|2=date=June 2010}} will be placed in [[:Category:Articles lacking in-text citations from June 2010]]. The ''cat'' parameter should not be linked, nor should the prefix <code>Category:</code> be used. === ''all'' === The ''all'' parameter defines a category into which all articles should be placed. The ''all'' parameter should not be linked, nor should the prefix <code>Category:</code> be used. == Additional parameters == === ''imageright'' === An image on the right side of the message box may be specified using this parameter. The syntax is the same as for the ''image'' parameter, except that the default is no image. === ''smallimage'' and ''smallimageright'' === Images for the small format box may be specified using these parameters. They will have no effect unless {{para|small|left}} is specified. === ''class'' === Custom [[Cascading Style Sheets|CSS]] classes to apply to the box. If adding multiple classes, they should be space-separated. === ''style'' and ''textstyle'' === Optional CSS values may be defined, without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. * ''style'' specifies the style used by the entire message box table. This can be used to do things such as modifying the width of the box. * ''textstyle'' relates to the text cell. === ''text'' and ''smalltext'' === Instead of specifying the ''issue'' and the ''fix'' it is possible to use the ''text'' parameter instead. Customised text for the small format can be defined using ''smalltext''. === ''plainlinks'' === Normally on Wikipedia, external links have an arrow icon next to them, like this: [http://www.example.com Example.com]. However, in message boxes, the arrow icon is suppressed by default, like this: <span class="plainlinks">[http://www.example.com Example.com]</span>. To get the normal style of external link with the arrow icon, use {{para|plainlinks|no}}. === ''cat2'', ''cat3'', ''all2'', and ''all3'' === * ''cat2'' and ''cat3'' provide for additional monthly categories; see [[#cat]]. * ''all2'' and ''all3'' provide for additional categories into which all articles are placed, just like [[#all]]. == Technical notes == * If you need to use special characters in the text parameter then you need to escape them like this: <syntaxhighlight lang="wikitext"> {{Ambox |nocat=true | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }} </syntaxhighlight> {{Ambox |nocat=true | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe &#124; and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }} * The <code>&lt;div></code> tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that. * The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons. * For more technical details see the [[Template talk:Ambox|talk page]] and the "See also" links below. Since this template works almost exactly like {{Tl|Tmbox}}, {{Tl|Imbox}}, {{Tl|Cmbox}} and {{Tl|Ombox}} their talk pages and related pages might also contain more details. ==Display on mobile devices== The MediaWiki developers have been conducted ongoing readability studies on ambox on the [https://en.m.wikipedia.org mobile version of Wikipedia]. Until further notice, code installed by the developers on the mobile version will generally override what we do here regarding the display and layout of this template. For more information, see [[:MW:Reading/Web/Projects/Mobile Page Issues]]. == TemplateData == {{TemplateData header|noheader=1}} <templatedata> { "params": { "1": {}, "small": { "label": "Small Mode", "description": "The small parameter should be passed through the template, as this will allow editors to use the small format by specifying |small=left on an article.", "type": "string", "suggestedvalues": [ "no", "left" ] }, "talk": {}, "date": {}, "name": { "label": "Template Name", "description": "The name parameter specifies the name of the template, without the Template namespace prefix. ", "type": "string" }, "type": {}, "image": {}, "sect": {}, "issue": {}, "fix": {}, "subst": {}, "info": {}, "removalnotice": {}, "cat": {}, "all": {}, "imageright": {}, "class": {}, "text ": {}, "plainlinks": {}, "smallimage ": {}, "smallimageright": {}, "textstyle": {}, "style ": {}, "smalltext": {}, "cat2": {}, "cat3": {}, "all2": {}, "all3": {} }, "paramOrder": [ "name", "subst", "small", "type", "image", "sect", "issue", "fix", "talk", "date", "1", "info", "removalnotice", "cat", "all", "imageright", "class", "text ", "plainlinks", "smallimage ", "smallimageright", "textstyle", "style ", "smalltext", "cat2", "cat3", "all2", "all3" ] } </templatedata> == Mbox family == {{Mbox templates see also}} == See also == * [[Wikipedia:Manual of Style/Article message boxes]] – The historical style guideline for creating article message boxes. <includeonly>{{sandbox other|| <!-- Add categories below this line, and interwikis at Wikidata --> [[Category:Article message templates| ]] [[Category:Mbox and messagebox templates]] }}</includeonly> df640bf2f71926dabed521e9dbd8dc495fb33e59 Template:Mbox templates (small) 10 976 1954 1953 2023-07-15T17:58:41Z Richard Robin 2 已从[[:wikipedia:Template:Mbox_templates_(small)]]导入1个版本 wikitext text/x-wiki <includeonly>{{Infobox | bodyclass = nowrap | bodystyle = width:auto;padding-bottom:0.6em;line-height:1.25em; | abovestyle = font-size:inherit; | above = Message box<br/>meta-templates | labelstyle = margin:0;padding:0 0.3em 0;text-align:center;font-weight:normal; | datastyle = margin:0;padding:0 0.5em 0 0; | label1 = ''template'' | data1 = ''context'' | label2 = {{tl|Ambox}} | data2 = article | label3 = {{tl|Cmbox}} | data3 = category | label4 = {{tl|Imbox}} | data4 = image | label5 = {{tl|Tmbox}} | data5 = talk | label6 = {{tl|Fmbox}} | data6 = footer / header | label7 = {{tl|Ombox}} | data7 = other pages | label8 = {{tl|Mbox}} | data8 = auto-detect | label9 = {{tl|Asbox}} | data9 = article stub | label10 = {{tl|Dmbox}} | data10 = disambiguation }}</includeonly><noinclude> {{Documentation}} </noinclude> 0b3ecac37228509c27b7b87ac29255ffde9ae20b Module:Message box/ambox.css 828 977 1956 1955 2023-07-15T17:58:41Z Richard Robin 2 已从[[:wikipedia:Module:Message_box/ambox.css]]导入1个版本 sanitized-css text/css /* {{pp|small=y}} */ .ambox { border: 1px solid #a2a9b1; /* @noflip */ border-left: 10px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } /* Single border between stacked boxes. Take into account base templatestyles, * user styles, and Template:Dated maintenance category. * remove link selector when T200206 is fixed */ .ambox + link + .ambox, .ambox + link + style + .ambox, .ambox + link + link + .ambox, /* TODO: raise these as "is this really that necessary???". the change was Dec 2021 */ .ambox + .mw-empty-elt + link + .ambox, .ambox + .mw-empty-elt + link + style + .ambox, .ambox + .mw-empty-elt + link + link + .ambox { margin-top: -1px; } /* For the "small=left" option. */ /* must override .ambox + .ambox styles above */ html body.mediawiki .ambox.mbox-small-left { /* @noflip */ margin: 4px 1em 4px 0; overflow: hidden; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; } .ambox-speedy { /* @noflip */ border-left: 10px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ambox-delete { /* @noflip */ border-left: 10px solid #b32424; /* Red */ } .ambox-content { /* @noflip */ border-left: 10px solid #f28500; /* Orange */ } .ambox-style { /* @noflip */ border-left: 10px solid #fc3; /* Yellow */ } .ambox-move { /* @noflip */ border-left: 10px solid #9932cc; /* Purple */ } .ambox-protection { /* @noflip */ border-left: 10px solid #a2a9b1; /* Gray-gold */ } .ambox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.5em; width: 100%; } .ambox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.5em; text-align: center; } .ambox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.5em 2px 0; text-align: center; } /* An empty narrow cell */ .ambox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ambox .mbox-image-div { width: 52px; } /* Hack around MobileFrontend being opinionated */ html.client-js body.skin-minerva .mbox-text-span { margin-left: 23px !important; } @media (min-width: 720px) { .ambox { margin: 0 10%; /* 10% = Will not overlap with other elements */ } } 29898fdc5160b39a8f580c76efe77afa1f6f58a4 Template:Hidden begin/styles.css 10 978 1958 1957 2023-07-15T17:58:42Z Richard Robin 2 已从[[:wikipedia:Template:Hidden_begin/styles.css]]导入1个版本 sanitized-css text/css /* {{pp-template}} */ .hidden-begin { box-sizing: border-box; width: 100%; padding: 5px; border: none; font-size: 95%; } .hidden-title { font-weight: bold; line-height: 1.6; text-align: left; } .hidden-content { text-align: left; } d4ab5680ca52bee10cfd2992f2adc45452c5ab37 Template:需要翻译 10 931 1959 1887 2023-07-15T18:04:09Z Richard Robin 2 试试看这个行不行 wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid #2971ff;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:Profinkling.png|100px|center]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>这个页面的内容需要翻译。</big></big>'''<br> <div style="margin-top:0.5em;">我们非常欢迎各位有能力的朋友协助我们翻译这些页面,但也请各位量力而行,不要使用机翻导致翻译出来的东西无法理解。请使用本土化的语言(尤其是在中文版已经出现的专有名词)。</div> </td> </tr> </table> 7d6710926472af94238b59814a0ceb3a1eec25a1 海底小纵队与海底风暴 0 67 1960 1889 2023-07-15T18:05:01Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与海底风暴</big><br><small>The Octonauts and the Undersea Storm</small> | image = The Octonauts and the Underwater Storm.png | width = 300px | imgwidth = 300px | bgcolor = #ACD6FF | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月5日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>中文版没有上一集}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与螃蟹海胆|螃蟹海胆]](英文版)<br> [[海底小纵队与大王乌贼|大王乌贼]](中文版)}} |} '''海底小纵队与海底风暴'''("The Octonauts and the Undersea Storm")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在中文版作为第1季第1集播出<ref>{{cite web | title = 海底小纵队第1季_百度百科 | url = https://baike.baidu.com/item/海底小纵队第1季/56736698?fr=aladdin#2 | date = 2022-09-29 | archiveurl = http://archive.today/V1EED | archivedate = 2022-09-29 }}</ref>,英国英文版则为第1季第2集,美国英文版也将其作为试播集播出。<ref> {{cite web | title = The Undersea Storm Octonauts Wiki Fandom | url = https://octonauts.fandom.com/wiki/The_Undersea_Storm | date = 2022-09-29 | archiveurl = http://archive.today/QBZju | archivedate = 2022-09-29 }} </ref> ==登场角色== *[[巴克队长]] *[[呱唧]] *The [[Reef Lobsters]] *[[Sea Urchin]] and zebra fish and green turtle and octopus and snot sea cucumber and crabs and green eel and hermit crabs (不完整,待补充) ==舰艇== *[[虎鲨艇]] *[[蓝鲸艇]] ==Summary== ==='''A New Upgrade'''=== The episode begins with [[Tweak]] working on the [[Gup-B]], adding a turbo button that [[Kwazii]] approves. He later goes out for a test drive, but ignores [[Tweak]]'s reminders of the conditions to use the turbo button, much to her chagrin. He enjoys himself. Meanwhile, [[Dashi]] suddenly alerts [[Captain Barnacles]] of a large storm using the [[Storm Tracker]]. A look from the [[Octoscope]] confirms this, and soon, all hands are on deck at making the [[Octopod]] safe for the storm, but when Barnacles got to Kwazii, a nervous Tweak then tells him about the test drive. ==='''Test Drive'''=== As expected, Kwazii was having the time of his life, entertaining a young [https://en.wikipedia.org/wiki/Reef_lobster reef lobster] who soon blows away. Kwazii notices this, and immediately heads out to rescue it. Unfortunately, it caused him to miss a call from Dashi. As he returns the little lobster, only then does he know about the storm. After a painful handshake, he sets off to save the creatures in the storm, receiving a second call from the [[Octopod]]. Letting them know of his current task, he sets out after getting permission from Barnacles. ==='''The Crash'''=== Multiple animals were rescued, and Kwazii sets off to the Octopod, seeing the little reef lobster along the way. Unfortunately, the Gup-B struggles against the storm, prompting him to use the turbo button - only to crash into some rocks. After losing contact, Barnacles heads out on a rescue mission in the [[Gup-C]], planning on towing the Gup-B home. However, the rescue attempt almost fails as the cable snaps, but luckily, the little reef lobster and his family form a chain and linked the cable. ==='''Return to the Octopod'''=== After pulling the Gup-B free, Barnacles heads back as fast as he can, with the little lobster and his family keeping the Gup-B secure behind. They make it just in time. All the Octonauts are safe and sound inside, with Kwazii and Barnacles giving their thanks to the little lobster. He accepts, and decides to stay in the Octopod for the time being. Tweak provides some commentary on the test drive, and soon, everyone was enjoying hot cocoa. ==Trivia/Goofs== * The characters paired up for this mission are [[Captain Barnacles]] and [[Kwazii Cat|Kwazii]]. * This episode’s Creature Report is on [[Reef Lobsters]] * This is the pilot episode of Octonauts in the US version. * The little lobster's family keeps changing size throughout the episode. * When Dashi says The storm is 10 minutes she is rather smiling then worried. * The 2 zebrafish Kwazii rescues lose their white pupils when the get to the reef. *This is the first episode where an octonaut crashes a gup, in this case its Kwazii. [[Category:剧集]] [[Category:第一季]] aa7d501d5a87ae98d3a222371bc2081422dd045f Video:海底小纵队主题曲(配视频) 400 979 1961 2023-07-15T18:15:23Z Richard Robin 2 wikitext text/x-wiki [[Category:视频]] c990cb66b2c5c7a5bc647d14cf91ff3f53afa894 Template:Copyright 10 980 1962 2023-07-15T18:37:47Z Richard Robin 2 创建页面,内容为“<table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px ; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid red;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[image:red_copyright.svg|50px|link=]]</td> <td style="padding: 0.5em 0.8em;">本作品仅以介绍为目的在海底小纵队维基…” wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px ; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid red;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[image:red_copyright.svg|50px|link=]]</td> <td style="padding: 0.5em 0.8em;">本作品仅以介绍为目的在海底小纵队维基中以非盈利性方式使用,其著作权由{{#if:{{{author|}}}|{{{author}}}|原著作权人}}保留。</div> </td> </tr> </table> dd3efba9016dab669848407ed119bac560fb435a File:Octonauts Theme Tune.mp3 6 981 1963 2023-07-15T18:38:39Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 海底小纵队(动画剧集) 0 14 1964 143 2023-07-15T18:41:31Z Richard Robin 2 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>《海底小纵队》</big><br>''Octonauts'' | image = OctonautsTV.jpg | width = 300px | imgwidth = 300px | bgcolor = #a6dff7 | subtitle = 《海底小纵队》动画海报 }} {{Simpleboxdata|label=导演|data=达拉赫·奥康纳<br>尼基·费兰<br>瓦西里耶维奇·米科尔斯基}} {{Simpleboxdata|label=制片|data=黄向锐(中文版)}} {{Simpleboxdata|label=编剧|data=Silvergate Media}} {{Simpleboxdata|label=发行方|data=Silvergate Media}} {{Simpleboxdata|label=上映日期|data=2010年10月4日至今(英文版)<br /> 2014年5月13日至今(中文版)}} {{Simpleboxdata|label=电视平台|data=CBeebies(英国BBC少儿频道)首播<br> Disney Junior(美国)<br> ABC(澳大利亚)<br> CCTV-14(中国)<br> TF1(法国)<br> Super RTL(德国)}} {{Simpleboxdata|label=产地|data=英国、爱尔兰}} {{Simpleboxdata|label=语言|data=英语、日语、韩语、法语、俄语、<br/>汉语普通话(国语)等}} |} '''《海底小纵队》'''(''Octonauts''),是英国银色之门影视公司(Silvegate Media)于2010年开播(中国大陆2014年开播)的儿童动画片,该作品改编自加拿大设计工作室Meomi的同名系列绘本。<br /> 该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及团队协作等内容。动画讲述了八个可爱的拟人化小动物组成的海底探险小队的故事。以巴克队长为领导核心,小队集结了医生、生物学家、摄影师、机械工程师等7名伙伴。他们是一群活跃在海底的冒险家,有着各自的爱好与独特的特长,在队长的带领下向着未知的海域不断探索前进。<br /> 目前海底小纵队在中国大陆的版权持有方是万达集团下属的万达宝贝王。 《海底小纵队》在世界已播出第一季50集、第二季22集、第三季20集、第四季26集、第五季27集、第六季26集、第七季26集。 == 介绍 == 《海底小纵队》是英国silvergate公司(银色大门)与俄罗斯开心球友好签约的旗下作品。该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及学龄前团队协作等内容。动画讲述了八个可爱小动物组成的海底探险小队的故事。他们居住在神秘基地——章鱼堡,随时准备出发去解决海底遇险、排除海底可能发生的危险。 <del>然后每集任务结束后就会来个名叫《海底报告》的尬舞+唱歌,可以听到巴克队长美妙的歌喉。</del>每集的海底报告歌词都不太一样。 每集动画都建立在一次探险的基础之上,小队成员发挥自己的特殊本领,克服险境,探索海洋奥妙,发现未知生物。 == 主题曲<ref>这里引用的是[[海底小纵队动画片第一季|动画剧集第一季]]的片头,有关于其他剧集的片头可以阅读其他词条。</ref> == === Youtube视频(需翻墙) === [[Video:海底小纵队主题曲(配视频)|800px]] === 音频(墙内特供) === [[File:Octonauts Theme Tune.mp3]] [[分类:海底小纵队]][[分类:动画]] 9608ca37b5c4dcce040409bf240a3e126e67de65 2008 1964 2023-07-16T07:10:15Z Richard Robin 2 增加链接 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>《海底小纵队》</big><br>''Octonauts'' | image = OctonautsTV.jpg | width = 300px | imgwidth = 300px | bgcolor = #a6dff7 | subtitle = 《海底小纵队》动画海报 }} {{Simpleboxdata|label=导演|data=达拉赫·奥康纳<br>尼基·费兰<br>瓦西里耶维奇·米科尔斯基}} {{Simpleboxdata|label=制片|data=黄向锐(中文版)}} {{Simpleboxdata|label=编剧|data=Silvergate Media}} {{Simpleboxdata|label=发行方|data=Silvergate Media}} {{Simpleboxdata|label=上映日期|data=2010年10月4日至今(英文版)<br /> 2014年5月13日至今(中文版)}} {{Simpleboxdata|label=电视平台|data=CBeebies(英国BBC少儿频道)首播<br> Disney Junior(美国)<br> ABC(澳大利亚)<br> CCTV-14(中国)<br> TF1(法国)<br> Super RTL(德国)}} {{Simpleboxdata|label=产地|data=英国、爱尔兰}} {{Simpleboxdata|label=语言|data=英语、日语、韩语、法语、俄语、<br/>汉语普通话(国语)等}} |} '''《海底小纵队》'''(''Octonauts''),是英国银色之门影视公司(Silvegate Media)于2010年开播(中国大陆2014年开播)的儿童动画片,该作品改编自加拿大设计工作室Meomi的同名系列绘本。<br /> 该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及团队协作等内容。动画讲述了八个可爱的拟人化小动物组成的海底探险小队的故事。以巴克队长为领导核心,小队集结了医生、生物学家、摄影师、机械工程师等7名伙伴。他们是一群活跃在海底的冒险家,有着各自的爱好与独特的特长,在队长的带领下向着未知的海域不断探索前进。<br /> 目前海底小纵队在中国大陆的版权持有方是万达集团下属的万达宝贝王。 《海底小纵队》在世界已播出第一季50集、第二季22集、第三季20集、第四季26集、第五季27集、第六季26集、第七季26集。 == 介绍 == 《海底小纵队》是英国silvergate公司(银色大门)与俄罗斯开心球友好签约的旗下作品。该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及学龄前团队协作等内容。动画讲述了八个可爱小动物组成的海底探险小队的故事。他们居住在神秘基地——章鱼堡,随时准备出发去解决海底遇险、排除海底可能发生的危险。 <del>然后每集任务结束后就会来个名叫《海底报告》的尬舞+唱歌,可以听到巴克队长美妙的歌喉。</del>每集的海底报告歌词都不太一样。 每集动画都建立在一次探险的基础之上,小队成员发挥自己的特殊本领,克服险境,探索海洋奥妙,发现未知生物。 == 主题曲<ref>这里引用的是[[海底小纵队动画片第一季|动画剧集第一季]]的片头,有关于其他剧集的片头可以阅读其他词条。</ref> == === Youtube视频(需翻墙) === [[Video:海底小纵队主题曲(配视频)|800px]] === 音频(墙内特供) === [[File:Octonauts Theme Tune.mp3]] == 相关链接 == * [[海底小纵队动画(第一季)]] * [[海底小纵队动画(第二季)]] * [[海底小纵队动画(第三季)]] * [[海底小纵队动画(第四季)]] * [[海底小纵队动画(第五季)]] * [[海底小纵队动画(第六季)]] * [[海底小纵队动画(第七季)]] * [[海底小纵队动画(第八季)]] [[分类:海底小纵队]][[分类:动画]] 287f99749c7c292d5efaddcf711d164982fdc63c 海底报告 0 982 1965 2023-07-15T19:17:06Z Richard Robin 2 创建页面,内容为“'''海底报告'''(Creature Report,第五季中文版又叫“中国生物报告”) 是[[海底小纵队(动画剧集)|海底小纵队]]剧集中每集<ref>特别篇由于每集不是特定以某个生物为主题,所以不会出现海底报告。</ref>用来介绍(复习)本集出现的生物的特别环节,通常时间为1分钟(因为都是固定的旋律然后往里面填词)。<s>由于太过魔性的尬舞以及队长魔性的歌喉…” wikitext text/x-wiki '''海底报告'''(Creature Report,第五季中文版又叫“中国生物报告”) 是[[海底小纵队(动画剧集)|海底小纵队]]剧集中每集<ref>特别篇由于每集不是特定以某个生物为主题,所以不会出现海底报告。</ref>用来介绍(复习)本集出现的生物的特别环节,通常时间为1分钟(因为都是固定的旋律然后往里面填词)。<s>由于太过魔性的尬舞以及队长魔性的歌喉经常被粉丝吐槽</s>。海底报告在英国版剧集中与正篇分开,在美国版和中文版则是在每集正篇结束后出现。每集海底报告,[[巴克队长]]都会对海底小纵队进行点名,然后[[呱唧]]激活屏幕上的海底报告(第五季为[[小敏]]激活屏幕)。海底报告中所提到的生物在[[章鱼堡]]的显示屏中都会使用真实图像和视频。 == 歌曲信息 == '''歌曲作者''': Peter Lurye '''出版发行''': Sony/ ATV Music Publishing == 细节 == * 有关海底小纵队第1-4季的海底报告,央视首播是否出现目前暂时无从考证,但第5季至第8季央视首播时只播了剧集正篇(并且是好几集放在一起组合成一集播出,并没有出现海底报告。 * 海底小纵队第5季的海底报告在中文版被叫做“中国生物报告”,并有[[小敏]]登场,歌曲的旋律与前四季没有太大变动,只是第5季由原本呱唧启动屏幕的动作改为小敏。 * 从第6季开始,由于增加了外派员<s>变成了海陆空纵队</s>,海底报告完全修改了歌词、旋律,并且由原本的7-8个角色参与变成了整个章鱼堡的成员+外派员共同参与(<s>队伍越来越壮大了,干脆也直接改成生物报告算了</s>) becf88cb6a91fd4dd08658318661844e28e59d17 1970 1965 2023-07-15T19:52:00Z Richard Robin 2 补充了部分细节 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底报告</big><br>Creature Report | image = 海底报告(1-3季).png | width = 350px | imgwidth = 300px | bgcolor = #a6dff7 | subtitle = 海底报告(第1-3季)<ref>其实第四季也和这张图一样,但是画面比前三季更加高清化。</ref> }} {{Simpleboxdata|label=别称|data=中国生物报告(中文版第5季)<br>Octo Report(英文版第6季之后)}} {{Simpleboxdata|label=作用|data=介绍本集出现的主题生物、自然现象等}} {{Simpleboxdata|label=出现频率|data=每集正片结束(除特别篇外)}} {{Simpleboxdata|label=登场人物|data=海底小纵队全体成员(第6季增加外派员)}} |} '''海底报告'''(第五季中文版又叫“中国生物报告”)(Creature Report、Octo Report) 是[[海底小纵队(动画剧集)|海底小纵队]]剧集中每集<ref>特别篇由于每集不是特定以某个生物为主题,所以不会出现海底报告。</ref>用来介绍(复习)本集出现的生物的特别环节,通常时间为1分钟(因为都是固定的旋律然后往里面填词)。<s>由于太过魔性的尬舞以及队长魔性的歌喉经常被粉丝吐槽</s>。海底报告在英国版剧集中与正篇分开,在美国版和中文版则是在每集正篇结束后出现。每集海底报告,[[巴克队长]]都会对海底小纵队进行点名,然后[[呱唧]]激活屏幕上的海底报告(第五季为[[小敏]]激活屏幕)。海底报告中所提到的生物在[[章鱼堡]]的显示屏中都会使用真实图像和视频。 == 歌曲信息 == '''歌曲作者''': 皮特·洛瑞(Peter Lurye) '''出版发行''': Sony/ ATV Music Publishing == 细节 == * 有关海底小纵队第1-4季的海底报告,央视首播是否出现目前暂时无从考证,但第5季至第8季央视首播时只播了剧集正片(并且是好几集放在一起组合成一集播出,并没有出现海底报告。 * 海底小纵队第5季的海底报告在中文版被叫做“中国生物报告”,并有[[小敏]]登场,歌曲的旋律与前四季没有太大变动,只是第5季由原本呱唧启动屏幕的动作改为小敏。 * 从第6季开始,由于增加了外派员<s>变成了海陆空纵队</s>,海底报告完全修改了歌词、旋律,并且由原本的7-8个角色参与变成了整个章鱼堡的成员+外派员共同参与(<s>队伍越来越壮大了,干脆也直接改成生物报告算了</s>),因为第6季不仅介绍生物也会介绍一些地理现象,所以英文版改名叫“Octo Report”<ref>音拼。</ref>。 == 视频(YouTube) == [[Video:海底报告第一季合集(英文)|600px]][[Video:海底报告第五季与前四季对比|600px]][[Video:第六季海底报告(Ice Volcanoes,英文)|600px]] == 相关链接 == * [https://www.bilibili.com/video/BV1ax41127Np/ 【海底小纵队】海底报告 1-3季合辑 英文版(哔哩哔哩)] * [https://www.bilibili.com/video/BV1d44y1J752/ 第六季海底报告合集(哔哩哔哩)] 17f7885f1c09497ab713a716b337cd2df83c28ae 1971 1970 2023-07-15T19:54:04Z Richard Robin 2 增加分类 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底报告</big><br>Creature Report | image = 海底报告(1-3季).png | width = 350px | imgwidth = 300px | bgcolor = #a6dff7 | subtitle = 海底报告(第1-3季)<ref>其实第四季也和这张图一样,但是画面比前三季更加高清化。</ref> }} {{Simpleboxdata|label=别称|data=中国生物报告(中文版第5季)<br>Octo Report(英文版第6季之后)}} {{Simpleboxdata|label=作用|data=介绍本集出现的主题生物、自然现象等}} {{Simpleboxdata|label=出现频率|data=每集正片结束(除特别篇外)}} {{Simpleboxdata|label=登场人物|data=海底小纵队全体成员(第6季增加外派员)}} |} '''海底报告'''(第五季中文版又叫“中国生物报告”)(Creature Report、Octo Report) 是[[海底小纵队(动画剧集)|海底小纵队]]剧集中每集<ref>特别篇由于每集不是特定以某个生物为主题,所以不会出现海底报告。</ref>用来介绍(复习)本集出现的生物的特别环节,通常时间为1分钟(因为都是固定的旋律然后往里面填词)。<s>由于太过魔性的尬舞以及队长魔性的歌喉经常被粉丝吐槽</s>。海底报告在英国版剧集中与正篇分开,在美国版和中文版则是在每集正篇结束后出现。每集海底报告,[[巴克队长]]都会对海底小纵队进行点名,然后[[呱唧]]激活屏幕上的海底报告(第五季为[[小敏]]激活屏幕)。海底报告中所提到的生物在[[章鱼堡]]的显示屏中都会使用真实图像和视频。 == 歌曲信息 == '''歌曲作者''': 皮特·洛瑞(Peter Lurye) '''出版发行''': Sony/ ATV Music Publishing == 细节 == * 有关海底小纵队第1-4季的海底报告,央视首播是否出现目前暂时无从考证,但第5季至第8季央视首播时只播了剧集正片(并且是好几集放在一起组合成一集播出,并没有出现海底报告。 * 海底小纵队第5季的海底报告在中文版被叫做“中国生物报告”,并有[[小敏]]登场,歌曲的旋律与前四季没有太大变动,只是第5季由原本呱唧启动屏幕的动作改为小敏。 * 从第6季开始,由于增加了外派员<s>变成了海陆空纵队</s>,海底报告完全修改了歌词、旋律,并且由原本的7-8个角色参与变成了整个章鱼堡的成员+外派员共同参与(<s>队伍越来越壮大了,干脆也直接改成生物报告算了</s>),因为第6季不仅介绍生物也会介绍一些地理现象,所以英文版改名叫“Octo Report”<ref>音拼。</ref>。 == 视频(YouTube) == [[Video:海底报告第一季合集(英文)|600px]][[Video:海底报告第五季与前四季对比|600px]][[Video:第六季海底报告(Ice Volcanoes,英文)|600px]] == 相关链接 == * [https://www.bilibili.com/video/BV1ax41127Np/ 【海底小纵队】海底报告 1-3季合辑 英文版(哔哩哔哩)] * [https://www.bilibili.com/video/BV1d44y1J752/ 第六季海底报告合集(哔哩哔哩)] [[分类:海底小纵队]][[分类:动画]][[分类:名词]] d1c408720afa78a9e4165abf48914125687ffccb 1972 1971 2023-07-15T20:02:15Z Richard Robin 2 /* 细节 */ wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>海底报告</big><br>Creature Report | image = 海底报告(1-3季).png | width = 350px | imgwidth = 300px | bgcolor = #a6dff7 | subtitle = 海底报告(第1-3季)<ref>其实第四季也和这张图一样,但是画面比前三季更加高清化。</ref> }} {{Simpleboxdata|label=别称|data=中国生物报告(中文版第5季)<br>Octo Report(英文版第6季之后)}} {{Simpleboxdata|label=作用|data=介绍本集出现的主题生物、自然现象等}} {{Simpleboxdata|label=出现频率|data=每集正片结束(除特别篇外)}} {{Simpleboxdata|label=登场人物|data=海底小纵队全体成员(第6季增加外派员)}} |} '''海底报告'''(第五季中文版又叫“中国生物报告”)(Creature Report、Octo Report) 是[[海底小纵队(动画剧集)|海底小纵队]]剧集中每集<ref>特别篇由于每集不是特定以某个生物为主题,所以不会出现海底报告。</ref>用来介绍(复习)本集出现的生物的特别环节,通常时间为1分钟(因为都是固定的旋律然后往里面填词)。<s>由于太过魔性的尬舞以及队长魔性的歌喉经常被粉丝吐槽</s>。海底报告在英国版剧集中与正篇分开,在美国版和中文版则是在每集正篇结束后出现。每集海底报告,[[巴克队长]]都会对海底小纵队进行点名,然后[[呱唧]]激活屏幕上的海底报告(第五季为[[小敏]]激活屏幕)。海底报告中所提到的生物在[[章鱼堡]]的显示屏中都会使用真实图像和视频。 == 歌曲信息 == '''歌曲作者''': 皮特·洛瑞(Peter Lurye) '''出版发行''': Sony/ ATV Music Publishing == 细节 == * 有关海底小纵队第1-4季的海底报告,央视首播是否出现目前暂时无从考证,但第5季至第8季央视首播时只播了剧集正片(并且是好几集放在一起组合成一集播出,并没有出现海底报告。 * 海底小纵队第5季的海底报告在中文版被叫做“中国生物报告”<ref>歌词里喊“生物报告”。</ref>,并有[[小敏]]登场,歌曲的旋律与前四季没有太大变动,只是第5季由原本呱唧启动屏幕的动作改为小敏。 * 从第6季开始,由于增加了外派员<s>变成了海陆空纵队</s>,海底报告完全修改了歌词、旋律,并且由原本的7-8个角色参与变成了整个章鱼堡的成员+外派员共同参与(<s>队伍越来越壮大了,干脆也直接改成生物报告算了</s>),因为第6季不仅介绍生物也会介绍一些地理现象,所以英文版改名叫“Octo Report”<ref>音拼。</ref>。 == 视频(YouTube) == [[Video:海底报告第一季合集(英文)|600px]][[Video:海底报告第五季与前四季对比|600px]][[Video:第六季海底报告(Ice Volcanoes,英文)|600px]] == 相关链接 == * [https://www.bilibili.com/video/BV1ax41127Np/ 【海底小纵队】海底报告 1-3季合辑 英文版(哔哩哔哩)] * [https://www.bilibili.com/video/BV1d44y1J752/ 第六季海底报告合集(哔哩哔哩)] [[分类:海底小纵队]][[分类:动画]][[分类:名词]] 8db5613682096ba856a739c4aa8e9a013ec2db12 File:海底报告(1-3季).png 6 983 1966 2023-07-15T19:23:32Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b Video:海底报告第一季合集(英文) 400 984 1967 2023-07-15T19:42:48Z Richard Robin 2 wikitext text/x-wiki [[Category:视频]] c990cb66b2c5c7a5bc647d14cf91ff3f53afa894 Video:海底报告第五季与前四季对比 400 985 1968 2023-07-15T19:44:23Z Richard Robin 2 wikitext text/x-wiki [[Category:视频]] c990cb66b2c5c7a5bc647d14cf91ff3f53afa894 Video:第六季海底报告(Ice Volcanoes,英文) 400 986 1969 2023-07-15T19:47:56Z Richard Robin 2 wikitext text/x-wiki [[Category:视频]] c990cb66b2c5c7a5bc647d14cf91ff3f53afa894 File:Kwazii2.jpg 6 990 1976 2023-07-15T20:39:02Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b Template:需要补充 10 991 1977 2023-07-15T20:42:57Z Richard Robin 2 创建页面,内容为“<table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid #FFBB77;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:Kwazii2.jpg|100px|center]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>我的老天爷啊!内容也…” wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid #FFBB77;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:Kwazii2.jpg|100px|center]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>我的老天爷啊!内容也太少了吧!</big></big>'''<br> <div style="margin-top:0.5em;">本页面内容过少,还需要继续补充完整,欢迎大家对本页的内容进行编写。但请遵守海底小纵队维基的编辑规范,不要编造无中生有的内容。</div> </td> </tr> </table> e383d3bf7fd934e1923c1c3263e829d15061fd12 File:Meomi.jpg 6 992 1978 2023-07-15T20:45:19Z Richard Robin 2 Michael C. Murphy(左)和黄慧琪(右)。 wikitext text/x-wiki == 摘要 == Michael C. Murphy(左)和黄慧琪(右)。 == 许可协议 == {{Copyright}} a2b60cf85eb96efe1b9ca5d2043231f3fdf0cc1a File:PD-icon.svg 6 993 1979 2023-07-15T20:58:54Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{PD-Old}} 1e66f9c36f0ba3126b4f6912b5da1498b38ae69c Template:可自由使用 10 994 1980 2023-07-15T20:59:38Z Richard Robin 2 创建页面,内容为“<table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px ; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid lightgreen;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:PD-icon.svg|50px|link=]]</td> <td style="padding: 0.5em 0.8em;">由于''{{{1|某种原因}}}'',作者已经放弃著…” wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px ; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid lightgreen;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:PD-icon.svg|50px|link=]]</td> <td style="padding: 0.5em 0.8em;">由于''{{{1|某种原因}}}'',作者已经放弃著作权,或声明可自由使用。</div> </td> </tr> </table> <includeonly>{{Iffile|[[分類:可自由使用]]}}</includeonly><noinclude>[[分類:授權協議]]</noinclude> 85f4e85657d55b3d236c120c70fd391b323fb1a4 1981 1980 2023-07-15T21:00:32Z Richard Robin 2 wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px ; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid lightgreen;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:PD-icon.svg|50px|link=]]</td> <td style="padding: 0.5em 0.8em;">由于''{{{1|某种原因}}}'',作者已经放弃著作权,或声明可自由使用。</div> </td> </tr> </table> 815fb0b363e5072099ab5d8535e6156bd7bc8794 File:人物头像.png 6 995 1982 2023-07-15T21:00:37Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{可自由使用}} 75cf638105497fc637af400819e054eb58427131 Template:现实人物 10 996 1983 2023-07-15T21:02:18Z Richard Robin 2 创建页面,内容为“<table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid gray;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:人物头像.png|80px|center]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>这是一个关于介绍现…” wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid gray;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:人物头像.png|80px|center]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>这是一个关于介绍现实中存在的人物的页面。</big></big>'''<br> <div style="margin-top:0.5em;">请不要编写有侵犯他人版权、攻击性、诽谤中伤他人或他人隐私的内容,违者可能会导致文章被删除甚至您的账号会被封禁,若编辑了不良的内容导致被当事人提告本站概不负责,一切后果由编辑者自行承担。</div> </td> </tr> </table> c69f524699b2c25d3d168450dfb3356fd82aecee Meomi 0 997 1984 2023-07-15T21:02:52Z Richard Robin 2 创建页面,内容为“{{现实人物}} {{需要翻译}} {{需要补充}} [[File:Meomi.jpg|thumb|Michael C. Murphy(左)和黄慧琪(右)]] '''Meomi Design Inc'''是一家加拿大/美国设计工作室,总部位于温哥华和洛杉矶,由黄慧琪(Vicki Wong)和Michael C. Murphy创立。 他们的作品包括温哥华2010年冬季奥运会吉祥物Miga、Quatchi、Sumi和Mukmuk,以及《海底小纵队》,其中《海底小纵队》被改编成动画短片并在…” wikitext text/x-wiki {{现实人物}} {{需要翻译}} {{需要补充}} [[File:Meomi.jpg|thumb|Michael C. Murphy(左)和黄慧琪(右)]] '''Meomi Design Inc'''是一家加拿大/美国设计工作室,总部位于温哥华和洛杉矶,由黄慧琪(Vicki Wong)和Michael C. Murphy创立。 他们的作品包括温哥华2010年冬季奥运会吉祥物Miga、Quatchi、Sumi和Mukmuk,以及《海底小纵队》,其中《海底小纵队》被改编成动画短片并在国际上播出。 The books also received their own cartoon series. ==Creations by Meomi Design== 1. Ciao Created August 14, 2006 Nationality: American MixMax Created: March 23 2005 Nationality: Italian, Brazilian, American 2. Miga, Quatchi, Sumi and Mukmuk from the Vancouver 2010 Olympics Created: November 27 2007 Nationality: Canadian 3. The Octonauts Created: March 30 2008 Nationality: British 4. Karen and Boopkins Created: January 23 2011 Nationality: American and Canadian 5. White is Menacing Created March 13, 2015 Nationality: American 6. Pow The Fox Created: October 26 2020 Nationality: American , and Canadian 7. Play:Time Created: October 30 2020 Nationality: Canadian 8. Francis Guetta Created: September 7 2021 Nationality: British and Canadian 9. TikTokGo! Created November 7 2021 Nationality: American, Canadian and British 10. Warrior Phones Created May 2 2022 Nationality: American and Australian bec83af0166607a19e818d6aa3ef619816497dea File:The great algae escape title card.png 6 998 1985 2023-07-16T04:41:13Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 海底小纵队与逃离海藻行动 0 999 1986 2023-07-16T04:51:51Z Richard Robin 2 创建页面,内容为“{{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与逃离海藻行动</big><br>The Octonauts and the Great Algae Escape | image = The great algae escape title card.png | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月12日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|lab…” wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与逃离海藻行动</big><br>The Octonauts and the Great Algae Escape | image = The great algae escape title card.png | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月12日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与大虎鲸|大虎鲸]](英文版)<br> [[海底小纵队与大王乌贼|大王乌贼]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与桨足动物|桨足动物]](英文版)<br> [[海底小纵队与海象首领|海象首领]](中文版)}} |} '''海底小纵队与逃离海藻行动'''("The Octonauts and the Great Algae Escape")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第8集,中文版则为第1季第3集。 == Summary == There is lots of algae, a germ-like substance that is shown when the ocean is polluted. As the Octonauts try to find the source of the problem, suddenly lots of sick crabs and lobsters hijacked the Octopod to find an area with less algae, and the Octonauts are outside trying to catch up with the runaway Octopod. Professor Inkling and the Vegimals are the only Octonauts on board the Octopod, but Barnacles and Kwazii managed to get in and stop the ship. The crew soon learns that the broken pipe they saw was leaking a bad chemical that made the algae grow and grow until there was too much. They go back and fix the pipe and then clean up all the extra algae so the crabs and lobsters could go home no longer sick. During the chase Inkling is trying to find a book about algae and ends up missing the excitement. == Plot == === Lots of Algae === The octonauts are investigating an area that is polluted with tons of algae. [[Category:剧集]] [[Category:第一季]] 6e34dbb2301cd81ada35836d51988cadd59ec8ef 1987 1986 2023-07-16T04:52:23Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与逃离海藻行动</big><br><small>The Octonauts and the Great Algae Escape</small> | image = The great algae escape title card.png | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月12日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与大虎鲸|大虎鲸]](英文版)<br> [[海底小纵队与大王乌贼|大王乌贼]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与桨足动物|桨足动物]](英文版)<br> [[海底小纵队与海象首领|海象首领]](中文版)}} |} '''海底小纵队与逃离海藻行动'''("The Octonauts and the Great Algae Escape")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第8集,中文版则为第1季第3集。 == Summary == There is lots of algae, a germ-like substance that is shown when the ocean is polluted. As the Octonauts try to find the source of the problem, suddenly lots of sick crabs and lobsters hijacked the Octopod to find an area with less algae, and the Octonauts are outside trying to catch up with the runaway Octopod. Professor Inkling and the Vegimals are the only Octonauts on board the Octopod, but Barnacles and Kwazii managed to get in and stop the ship. The crew soon learns that the broken pipe they saw was leaking a bad chemical that made the algae grow and grow until there was too much. They go back and fix the pipe and then clean up all the extra algae so the crabs and lobsters could go home no longer sick. During the chase Inkling is trying to find a book about algae and ends up missing the excitement. == Plot == === Lots of Algae === The octonauts are investigating an area that is polluted with tons of algae. [[Category:剧集]] [[Category:第一季]] a25b50959e9aea18ac74e27cda8cbe160c621aae 1989 1987 2023-07-16T04:58:08Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与逃离海藻行动</big><br><small>The Octonauts and the Great Algae Escape</small> | image = The great algae escape title card.png | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月13日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与大虎鲸|大虎鲸]](英文版)<br> [[海底小纵队与大王乌贼|大王乌贼]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与桨足动物|桨足动物]](英文版)<br> [[海底小纵队与海象首领|海象首领]](中文版)}} |} '''海底小纵队与逃离海藻行动'''("The Octonauts and the Great Algae Escape")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第8集,中文版则为第1季第3集。 == Summary == There is lots of algae, a germ-like substance that is shown when the ocean is polluted. As the Octonauts try to find the source of the problem, suddenly lots of sick crabs and lobsters hijacked the Octopod to find an area with less algae, and the Octonauts are outside trying to catch up with the runaway Octopod. Professor Inkling and the Vegimals are the only Octonauts on board the Octopod, but Barnacles and Kwazii managed to get in and stop the ship. The crew soon learns that the broken pipe they saw was leaking a bad chemical that made the algae grow and grow until there was too much. They go back and fix the pipe and then clean up all the extra algae so the crabs and lobsters could go home no longer sick. During the chase Inkling is trying to find a book about algae and ends up missing the excitement. == Plot == === Lots of Algae === The octonauts are investigating an area that is polluted with tons of algae. [[Category:剧集]] [[Category:第一季]] da20b59113049e9689bde00add2cab4e32326a16 File:Remipedes title card.jpg 6 1000 1988 2023-07-16T04:57:24Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 海底小纵队与桨足动物 0 1001 1990 2023-07-16T05:08:16Z Richard Robin 2 创建页面,内容为“{{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与桨足动物</big><br>The Octonauts and the Remipedes | image = Remipedes_title_card.jpg | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月14日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=海底…” wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与桨足动物</big><br>The Octonauts and the Remipedes | image = Remipedes_title_card.jpg | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月14日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与逃离海藻行动|逃离海藻行动]](英文版)<br> [[海底小纵队与白化座头鲸|白化座头鲸]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与敏捷的旗鱼|敏捷的旗鱼]](英文版)<br> [[海底小纵队与大虎鲸|大虎鲸]](中文版)}} |} '''海底小纵队与桨足动物'''("The Octonauts and the Remipedes")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第9集,中文版则为第1季第10集。 == Summary == Shellington takes the Gup-D in search of remipedes - strange, blind undersea centipede-like creatures. Of course, he crashes the Gup-D and sees a dark undersea cave. As he gets lost inside he discovers a school of remipedes. Captain Barnacles, Kwazii and Peso board the Gup-C and search the undersea cave to rescue Shellington, only to get lost themselves. Luckily, the remipedes use their senses to lead them out. [[Category:剧集]] [[Category:第一季]] ece46f74834786bcafc04d0c48f35d75f2c78d2e File:The-speedy-sailfish-title-screen10.png 6 1002 1991 2023-07-16T05:11:01Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 海底小纵队与敏捷的旗鱼 0 1003 1992 2023-07-16T05:14:47Z Richard Robin 2 创建页面,内容为“{{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与敏捷的旗鱼</big><br><small>The Octonauts and the Speedy Sailfish</small> | image = The-speedy-sailfish-title-screen10.png | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月15日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleb…” wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与敏捷的旗鱼</big><br><small>The Octonauts and the Speedy Sailfish</small> | image = The-speedy-sailfish-title-screen10.png | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月15日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与桨足动物|桨足动物]](英文版)<br> [[海底小纵队与水母爆发|水母爆发]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与水滴鱼兄弟|水滴鱼兄弟]](英文版)<br> [[海底小纵队与吸血乌贼|吸血乌贼]](中文版)}} |} '''海底小纵队与敏捷的旗鱼'''("The Octonauts and the Speedy Sailfish")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第9集,中文版则为第1季第10集。 == Summary == Tweak brings out her newest invention, the smartgup boxes, that can control all the Gups at once and make them drive themselves. As Shellington tries out the remote control to the Gups, he accidentally breaks it, causing all the Gups to travel alone without any pilots. It is up to Captain Barnacles and Kwazii in the Gup-F to catch them, but when they find a school of sailfish, the fastest fish in the ocean, they enlist their help to round them up. == Plot == == Characters == Captain Barnacles Kwazii Peso (silent cameo) Shellington Dashi (speaks only in HQ) Tweak Professor Inkling (silent cameo) The Pacific sailfish [[Category:剧集]] [[Category:第一季]] 309eedaa906138654f2c40d081cdd58c1046b4b4 1993 1992 2023-07-16T05:15:51Z Richard Robin 2 修改错误 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与敏捷的旗鱼</big><br><small>The Octonauts and the Speedy Sailfish</small> | image = The-speedy-sailfish-title-screen10.png | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月15日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与桨足动物|桨足动物]](英文版)<br> [[海底小纵队与水母爆发|水母爆发]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与水滴鱼兄弟|水滴鱼兄弟]](英文版)<br> [[海底小纵队与吸血乌贼|吸血乌贼]](中文版)}} |} '''海底小纵队与敏捷的旗鱼'''("The Octonauts and the Speedy Sailfish")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第10集,中文版则为第1季第17集。 == Summary == Tweak brings out her newest invention, the smartgup boxes, that can control all the Gups at once and make them drive themselves. As Shellington tries out the remote control to the Gups, he accidentally breaks it, causing all the Gups to travel alone without any pilots. It is up to Captain Barnacles and Kwazii in the Gup-F to catch them, but when they find a school of sailfish, the fastest fish in the ocean, they enlist their help to round them up. == Plot == == Characters == Captain Barnacles Kwazii Peso (silent cameo) Shellington Dashi (speaks only in HQ) Tweak Professor Inkling (silent cameo) The Pacific sailfish [[Category:剧集]] [[Category:第一季]] 2cdb0c51dc71efbd0dc5c8df6581952653fb0ca4 File:The blobfish brothers title card.png 6 1004 1994 2023-07-16T05:19:26Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 海底小纵队与水滴鱼兄弟 0 1005 1995 2023-07-16T05:20:13Z Richard Robin 2 创建页面,内容为“{{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与水滴鱼兄弟</big><br><small>The Octonauts and the Blobfish Brothers</small> | image = The_blobfish_brothers_title_card.png | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月18日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleb…” wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与水滴鱼兄弟</big><br><small>The Octonauts and the Blobfish Brothers</small> | image = The_blobfish_brothers_title_card.png | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月18日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与敏捷的旗鱼|敏捷的旗鱼]](英文版)<br> [[海底小纵队与大虎鲸|大虎鲸]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与怪兽地图|怪兽地图]](英文版)<br> [[海底小纵队与装饰蟹|装饰蟹]](中文版)}} |} '''海底小纵队与水滴鱼兄弟'''("The Octonauts and the Blobfish Brothers")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第11集,中文版则为第1季第12集。 == Summary == Tweak brings out her newest invention, the smartgup boxes, that can control all the Gups at once and make them drive themselves. As Shellington tries out the remote control to the Gups, he accidentally breaks it, causing all the Gups to travel alone without any pilots. It is up to Captain Barnacles and Kwazii in the Gup-F to catch them, but when they find a school of sailfish, the fastest fish in the ocean, they enlist their help to round them up. == Plot == == Characters == Captain Barnacles Kwazii Peso (silent cameo) Shellington Dashi (speaks only in HQ) Tweak Professor Inkling (silent cameo) The Pacific sailfish [[Category:剧集]] [[Category:第一季]] 924bc339d008f7797806f60a965b4da48220a4ca 1996 1995 2023-07-16T05:20:55Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = | toptext = <big>海底小纵队与水滴鱼兄弟</big><br><small>The Octonauts and the Blobfish Brothers</small> | image = The_blobfish_brothers_title_card.png | width = 300px | imgwidth = 300px | bgcolor = #99dadd | subtitle = }} {{Simpleboxdata|label=播出日期|data=2010年10月18日}} {{Simpleboxdata|label=本集作者|data=Stephanie Simpson}} {{Simpleboxdata|label=本集导演|data=Darragh O'Connell}} {{Simpleboxdata|label=上一集|data=[[海底小纵队与敏捷的旗鱼|敏捷的旗鱼]](英文版)<br> [[海底小纵队与大虎鲸|大虎鲸]](中文版)}} {{Simpleboxdata|label=下一集|data=[[海底小纵队与怪兽地图|怪兽地图]](英文版)<br> [[海底小纵队与装饰蟹|装饰蟹]](中文版)}} |} '''海底小纵队与水滴鱼兄弟'''("The Octonauts and the Blobfish Brothers")是[[海底小纵队动画(第一季)|海底小纵队动画片第一季]]剧集中的其中一集。<br> 该集在英国英文版中是第1季第11集,中文版则为第1季第12集。 == Summary == Tweak brings out her newest invention, the smartgup boxes, that can control all the Gups at once and make them drive themselves. As Shellington tries out the remote control to the Gups, he accidentally breaks it, causing all the Gups to travel alone without any pilots. It is up to Captain Barnacles and Kwazii in the Gup-F to catch them, but when they find a school of sailfish, the fastest fish in the ocean, they enlist their help to round them up. == Plot == == Characters == Captain Barnacles Kwazii Peso (silent cameo) Shellington Dashi (speaks only in HQ) Tweak Professor Inkling (silent cameo) The Pacific sailfish [[Category:剧集]] [[Category:第一季]] a994b8c0c1d2d6bf5e3d268fb04e576dfd4c13ad File:Octonauts Min.jpg 6 1006 1997 2023-07-16T05:37:30Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 小敏 0 1007 1998 2023-07-16T05:38:08Z Richard Robin 2 创建页面,内容为“{{需要翻译}} [[File:Octonauts Min.jpg|thumb|小敏]] '''小敏('''Min)is a red panda who lives in China beside the Yangtze River. She is a mapmaker, and draws new places on her maps. She is an old friend of [[Inkling|Professor Inkling]]. She made her debut in "[[The Chinese Giant Salamander]]”, a special in [[Season 5]]. She also appears in [[Octonauts: Above and Beyond|Above and Beyond]] as a recurring Octo-Agent. A quote describing her from the o…” wikitext text/x-wiki {{需要翻译}} [[File:Octonauts Min.jpg|thumb|小敏]] '''小敏('''Min)is a red panda who lives in China beside the Yangtze River. She is a mapmaker, and draws new places on her maps. She is an old friend of [[Inkling|Professor Inkling]]. She made her debut in "[[The Chinese Giant Salamander]]”, a special in [[Season 5]]. She also appears in [[Octonauts: Above and Beyond|Above and Beyond]] as a recurring Octo-Agent. A quote describing her from the official Octonauts accounts: A red panda and a skilled mapmaker. == Appearance == Min wears a Chinese-inspired blue sleeveless tank top with yellow trim, and with little strings tying the front. She also wear gray shorts and brown shoes. In her hair is a headband with a pink flower that looks like a cherry blossom. She also has a bag like [[Shellington Sea Otter|Shellington]]. Her fur is orange and red with white ears and brown lines on her tail. She has white markings on her face. She also has eyelashes, which is rarely seen in the show. == Trivia == * It is revealed in [[Season 5]] that she met [[Inkling]] when he got stuck clinging to bamboo after a storm and had to save him by carrying him down. * She is also the first character from Asia, and the first character friend to discover in Asia. * Like real-life red pandas, Min is extremely flexible and talented when it comes to climbing trees and up bamboo. She can even jump high and flip while climbing rocky cliffs. * Min is usually seen with her mapmaking stuff including her paper and painting brush. * As of now, Min is the only character with eyelashes. * Min is also the only character to appear in a Creature Report sequence besides the main crew in an exclusive animation. * Min appears to have undergone a design change between her older 2D artwork and finalized appearance in the show. Her previous design lacks her eyelashes and flower accessory, and her color palette is much more red with less light orange tones. Her arms and legs are also drastically darker in comparison to her 3D model, and along with that, she is not wearing shoes. * Furthermore, there have been images showcasing a toy of her made with her original design on the packaging, implying that marketing for Season 5 before its delay had existed. * Curiously, she seems to be making her debut in the franchise outside of China airings in [[Above and Beyond Season 1|Above & Beyond Season 1]] first, instead of [[Season 5]]. This may spawn an inconsistency in how the Octonauts meet her in the continuity, as her original debut was in the [[The Yangtze River|Yangtze River]] special. * Just like the [[Vegimals]] with their fish biscuits and [[Paani the Monkey|Paani]] with his "Paani Patties", Min also has her own snack called "Bamboo Biscuits" which she uses in The Bamboo Rescue and The Caterpillar Caravan. * She claims she's encountered pandas before, but never when they compete for food or territory.  * It is revealed in the Octonauts and the Rainforest Rescue that Min and Inkling may have some feelings for each other based on what she calls him. * In season 5 The chinese giant salamander, it was revealed that she can write maps very very fast. == Appearances == * [[The Chinese Giant Salamander]] (Debut) * Above and Beyond: [[The Skeleton Coast Adventure]] (minor) * Above and Beyond: [[The Caterpillar Caravan]] * Above and Beyond: [[The Bamboo Rescue]] * Above and Beyond: [[The Octonauts and the Rainforest Rescue]] * Above and Beyond: [[The Snag Hotel]] == Creature Friends == * [[Chinese Giant Salamander]] * [[Guillermo]] the Caterpillar/Butterfly * Giant Pandas * Choti the Black Giant Squirrel * Tokay Gecko * Mr. and Mrs. Hornbill * Atif the Sun Bear * [[Junior]] the Baby Harpy Eagle and [[Junior's Parents|his Parents]] * [[Paolo]] the Hoatzin * [[Adriana]] the Anteater == Relationships == * [[Min Relationships]] == Quotes: == * "Perfect timing, Captain!" * "And I'm Min! I'm and Octo-Agent. I make maps!" * "Yes. A map shows you how to get from one place to another! And look! I have a map that shows a way to get from this bamboo forest to a new bamboo forest!" * "Captain. I have some bamboo biscuits in my bag." * "How about some bamboo biscuits?" * ”Oh, Inky” * "What was that?" 99625bbab9ae42d8ae7ad3af81e99c8b554bfee7 1999 1998 2023-07-16T05:39:42Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} [[File:Octonauts Min.jpg|thumb|小敏]] '''小敏('''Min)is a red panda who lives in China beside the Yangtze River. She is a mapmaker, and draws new places on her maps. She is an old friend of [[Inkling|Professor Inkling]]. She made her debut in "[[The Chinese Giant Salamander]]”, a special in [[Season 5]]. She also appears in [[Octonauts: Above and Beyond|Above and Beyond]] as a recurring Octo-Agent. A quote describing her from the official Octonauts accounts: A red panda and a skilled mapmaker. == Appearance == Min wears a Chinese-inspired blue sleeveless tank top with yellow trim, and with little strings tying the front. She also wear gray shorts and brown shoes. In her hair is a headband with a pink flower that looks like a cherry blossom. She also has a bag like [[Shellington Sea Otter|Shellington]]. Her fur is orange and red with white ears and brown lines on her tail. She has white markings on her face. She also has eyelashes, which is rarely seen in the show. == Trivia == * It is revealed in [[Season 5]] that she met [[Inkling]] when he got stuck clinging to bamboo after a storm and had to save him by carrying him down. * She is also the first character from Asia, and the first character friend to discover in Asia. * Like real-life red pandas, Min is extremely flexible and talented when it comes to climbing trees and up bamboo. She can even jump high and flip while climbing rocky cliffs. * Min is usually seen with her mapmaking stuff including her paper and painting brush. * As of now, Min is the only character with eyelashes. * Min is also the only character to appear in a Creature Report sequence besides the main crew in an exclusive animation. * Min appears to have undergone a design change between her older 2D artwork and finalized appearance in the show. Her previous design lacks her eyelashes and flower accessory, and her color palette is much more red with less light orange tones. Her arms and legs are also drastically darker in comparison to her 3D model, and along with that, she is not wearing shoes. * Furthermore, there have been images showcasing a toy of her made with her original design on the packaging, implying that marketing for Season 5 before its delay had existed. * Curiously, she seems to be making her debut in the franchise outside of China airings in [[Above and Beyond Season 1|Above & Beyond Season 1]] first, instead of [[Season 5]]. This may spawn an inconsistency in how the Octonauts meet her in the continuity, as her original debut was in the [[The Yangtze River|Yangtze River]] special. * Just like the [[Vegimals]] with their fish biscuits and [[Paani the Monkey|Paani]] with his "Paani Patties", Min also has her own snack called "Bamboo Biscuits" which she uses in The Bamboo Rescue and The Caterpillar Caravan. * She claims she's encountered pandas before, but never when they compete for food or territory.  * It is revealed in the Octonauts and the Rainforest Rescue that Min and Inkling may have some feelings for each other based on what she calls him. * In season 5 The chinese giant salamander, it was revealed that she can write maps very very fast. == Appearances == * [[The Chinese Giant Salamander]] (Debut) * Above and Beyond: [[The Skeleton Coast Adventure]] (minor) * Above and Beyond: [[The Caterpillar Caravan]] * Above and Beyond: [[The Bamboo Rescue]] * Above and Beyond: [[The Octonauts and the Rainforest Rescue]] * Above and Beyond: [[The Snag Hotel]] == Creature Friends == * [[Chinese Giant Salamander]] * [[Guillermo]] the Caterpillar/Butterfly * Giant Pandas * Choti the Black Giant Squirrel * Tokay Gecko * Mr. and Mrs. Hornbill * Atif the Sun Bear * [[Junior]] the Baby Harpy Eagle and [[Junior's Parents|his Parents]] * [[Paolo]] the Hoatzin * [[Adriana]] the Anteater == Relationships == * [[Min Relationships]] == Quotes: == * "Perfect timing, Captain!" * "And I'm Min! I'm and Octo-Agent. I make maps!" * "Yes. A map shows you how to get from one place to another! And look! I have a map that shows a way to get from this bamboo forest to a new bamboo forest!" * "Captain. I have some bamboo biscuits in my bag." * "How about some bamboo biscuits?" * ”Oh, Inky” * "What was that?" ​[[分类:人物]]​[[分类:海底小纵队成员]][[分类:海底小纵队外派员]]​ abafa1bc3128fd23ba3518ee8eb5396c495abba9 File:Octo-Agent.jpg 6 1008 2000 2023-07-16T05:43:49Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 海底小纵队外派员 0 1009 2001 2023-07-16T06:00:24Z Richard Robin 2 创建页面,内容为“{{需要翻译}} {{需要补充}} [[File:Octo-Agent.jpg|缩略图|海底小纵队外派员]] '''海底小纵队外派员'''(Octo-Agent)是从[[海底小纵队动画(第六季)|动画片第六季]]开始出现的附属团队,他们分布在世界各个角落以弥补[[海底小纵队(团队)|海底小纵队]]的一些局限性。这些人物有的是从第六季开始新登场的角色,也有的是从前五季里就登场过的配角。 == 背…” wikitext text/x-wiki {{需要翻译}} {{需要补充}} [[File:Octo-Agent.jpg|缩略图|海底小纵队外派员]] '''海底小纵队外派员'''(Octo-Agent)是从[[海底小纵队动画(第六季)|动画片第六季]]开始出现的附属团队,他们分布在世界各个角落以弥补[[海底小纵队(团队)|海底小纵队]]的一些局限性。这些人物有的是从第六季开始新登场的角色,也有的是从前五季里就登场过的配角。 == 背景 == The Octonauts can’t tackle this new set of worldwide challenges alone! Barnacles has assembled a new team of experts & adventurers: The Octo-Agents! They're positioned all over the world to call in emergencies and aid in missions. <ref>{{cite web | title = Octonauts on Twitter: "The Octonauts can’t tackle this new set of wor… | url = https://twitter.com/Octonauts/status/1427661327481380871 | date = 2023-07-16 | archiveurl = http://archive.today/nnZIQ | archivedate = 2023-07-16 }}</ref> == 组成 == *[[咔嚓船长]] *[[宾托]] *[[卡西西]] *[[纳克教授]] *[[沼泽游侠]] *[[帕尼]] *[[小敏]] *[[坦克]] *[[瑞拉]] *[[珍珠]] [[分类:海底小纵队]][[分类:团队]][[分类:人物]] 146721466efac76fff973a55019a778a5e950838 皮医生 0 46 2002 64 2023-07-16T06:20:06Z Richard Robin 2 信息卡 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>皮医生</big><br>Peso | image = PesoPenguin.png | width = 320px | bgcolor = #eaeaea | subtitle = }} {{Simpleboxdata|label=性别|data=男}} {{Simpleboxdata|label=物种|data=企鹅}} {{Simpleboxdata|label=颜色|data=白色和黑色}} {{Simpleboxdata|label=职业|data=医生}} {{Simpleboxdata|label=居住地|data=[[章鱼堡]]}} {{Simpleboxdata|label=最喜欢的舰艇|data=[[孔雀鱼艇]]}} {{Simpleboxdata|label=最喜欢做的事|data=敲木琴、治疗(<del>绷带包扎包治百病</del>)}} {{Simpleboxdata|label=兄弟姐妹|data=[[宾托]](弟弟)、[[皮果]]<ref>特别篇中文名也叫“果果”</ref>(哥哥}} {{Simpleboxdata|label=毕业学校|data=某医学院<ref>剧集中皮医生有提过自己在医学院读书的经历,但没有提过具体是哪一所医学院。</ref>}} {{Simpleboxdata|label=其他亲戚|data=近亲:皮娜塔、皮蒂塔、皮皮、皮皮塔、皮踢踏……<ref>参考[[海底小纵队与水滴鱼兄弟]]这一集。</ref><br>表亲:阿德利企鹅、帝企鹅等}} {{Simpleboxdata|label=初次露面|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>[[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=(待补充)}} {{Simpleboxdata|label=配音演员|data=Paul Panting(英国版)<br>Wayne Grayson(美国版)}} |} 皮医生(Peso)名叫皮索,是一只可爱的企鹅,他是小队的医生,来自一个很大的企鹅家庭。他是小队中最年轻的成员。也常常把呱唧的吹牛皮当真。他不太喜欢吓人的情境(比如恐怖的船、黑漆漆的山洞),但是如果有人受伤或陷入麻烦,他会是小队中最勇敢的那个。宽广的心胸使他赢得了所有人的支持,无论是可怕的大型海洋动物还是小小的浮游生物。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:男 *物种:企鹅 *年龄:约18岁左右 *职务:医生 *别称:皮医生、小皮、皮皮 *关系:巴克队长(队长、信赖)、呱唧(同事)、宾托(弟弟) == 介绍 == 他是小队的医生,来自一个很大的企鹅家庭。他是小队中最年轻的成员。也常常把呱唧讲的传说当真。他不太喜欢吓人的情境(比如恐怖的船、黑漆漆的山洞),但是如果有人受伤或陷入麻烦,他会是小队中最勇敢的那个。宽广的心胸使他赢得了所有人的支持,无论是可怕的大型海洋动物还是小小的浮游生物。 他的勇气来自于一颗关爱别人的心。不过大家别被他暂且蹒跚的步态蒙骗了,当需要包扎时候,他的鳍会开足马力全速前进,他擅长包包裹、缠绷带、打结、解结,每次做这些事都会说:“嘿、嚓、呼、呀”可以在一秒内做好这些事。总之不管什么病都只需要缠绷带就可以治好。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:企鹅]] 4657a91488baeaeaf3451f4a69a04e4cad5f814d File:Octonauts- Above & Beyond Logo.png 6 1010 2003 2023-07-16T06:36:50Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b File:Octonauts- Above & Beyond Netflix poster.jpg 6 1011 2004 2023-07-16T06:38:07Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 海底小纵队动画(第六季) 0 1012 2005 2023-07-16T06:52:02Z Richard Robin 2 创建页面,内容为“{{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第六季</big><br><small>Octonauts: Above & Beyond Season 1</small> | image = Octonauts- Above & Beyond Netflix poster.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第六季(英文版)在Netflix上的海报 }} {{Simpleboxdata|label=集数|data=25(包含特别篇)}} {{Simpleboxdata|…” wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第六季</big><br><small>Octonauts: Above & Beyond Season 1</small> | image = Octonauts- Above & Beyond Netflix poster.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第六季(英文版)在Netflix上的海报 }} {{Simpleboxdata|label=集数|data=25(包含特别篇)}} {{Simpleboxdata|label=首播|data=2021年7月26日(CCTV)<br>2021年9月7日(Netflix)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第五季)]]}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第七季)]]}} |} '''海底小纵队动画第六季'''(Octonauts: Above & Beyond Season 1, otherwise known as Octonauts Season 6),是[[海底小纵队(动画剧集)|海底小纵队系列]]的第六部作品。 英文版将其及[[海底小纵队动画(第七季)|第七季]]、[[海底小纵队动画(第八季)|第八季]]作为与海底小纵队正篇完全独立的新剧集(衍生剧集),名叫“Above & Beyond”系列。该部分为“Above & Beyond”系列的第一季。第六季正式章节共24集,每集约11分钟左右。还有一个长达22分钟的特别篇。第六季也是第一次使用了“[[海底小纵队外派员|外派员]]”的概念。 It was confirmed on July 2, 2018 by Silvergate CEO and co-founder, Waheed Alli, and first reported by Variety: He hints at a new direction for the Octonauts. “It is going to see a departure from Seasons 1 to 5. We are driven by our own curiosity and wanted to go to other places.”<ref>https://variety.com/2018/film/news/octonauts-movies-silvergate-china-expansion-wanda-1202860344/</ref> The debut series introduces the concept of "Terra Gups" which, unlike regular Gups, are used for traveling on land. It also introduces a new character, Paani. In addition, the Octo-Agents team is introduced, a group of characters scattered across the globe who can aid creatures anywhere. The Octo-Agents introduced in this season are mainly pre-established family members or friends of the Octonauts, including Min the Mapmaker from Season 5, Tracker, Professor Natquik, Ranger Marsh, and Koshi from Season 4, Pinto from Season 1, Ryla from The Caves of Sac Actun, Calico Jack from Season 2, and Pearl and Periwinkle from Season 3. It had its first episode premiere on the Octonauts YouTube channel on August 25th, 2021, and debuted as a Netflix Original series on September 7th 2021 worldwide. == Summary from website == Responding to a range of new dangers across our ever-changing planet, the Octonauts take their adventures beyond the sea and onto LAND! Enlisting their intrepid friends from around the globe as specialized Octo-Agents, and equipped with a new fleet of land-based Terra Gups, the Octonauts’ mission is as vital as ever: They will explore harsh and remote environments, rescue animals that need their help, and protect the land and all living creatures! == 剧集 == (待补充) == Trivia == This series will be multiple characters’ first time appearing in the show since their debut, including Ryla, Ranger Marsh, Min the Mapmaker, Tracker, Koshi, and more. Furthermore, due to Season 5’s delay in releasing Worldwide (excluding China), this is also Calico Jack, Pearl, Periwinkle, and Professor Natquik’s first time appearing again since their debut episodes in the original series. The only family-members of the crew that have yet to make a return are Bianca, her cubs, and Squirt. This series includes an aged-up Periwinkle, showcasing some sort of timeskip since he’s appeared last in Season 5. He has a new physical appearance, can talk in full sentences, and is currently attending “Sea Otter Scouts” whilst Pearl helps out on missions as an Octo-Agent. Though, once in a while, they'll talk to each other to say hello or ask for advice. Strangely, Above and Beyond is set to be released in English on Netflix before Season 5. This may pose an inconsistency with how Min the Mapmaker is introduced, since she appears twice in the first 26 episodes of the spinoff show. This will also affect Periwinkle’s new age-up, the introduction of the Gup R, Calico Jack's reintroduction, exc. Some characters have different voice actors in the US dub, whether due to Jenny Yokobori now voicing Dashi as of The Caves of Sac Actun (Koshi) along with Jo Wyatt as Tweak not being dubbed over anymore after the original show’s Season 1 (Pinto). The 6th episode of the original China airings, “The Cold Snap”, was replaced by “The Bamboo Rescue”, the 13th episode of Season 1 on Netflix. The Bamboo Rescue has also been excluded from the airings of Season 1 in China, along with all apperances of giant pandas within the show. It is currently unknown why it’s been censored overseas. The Cold Snap would eventually make it's english debut in the second season, but poses some continuity issues of Ranger Marsh not liking the Gup-K, nearly as much as he begun to in The Nine Banded Armadillo. Koshi and Pinto are categorized under “Junior Octo-Agents” due to their young age. Kwazii will be completely absent in some episodes, presumably due to him doing missions/travelling with Calico Jack. Additionally, other characters are shown to be absent in episodes, likely due to being out on missions. Shellington will wear a cave diving suit for the very first time. Paani makes his debut in this season as a brand new reoccurring character, aiding the Octonauts as an Octo-Agent. == Gups == * Terra Gup 1 (TG-1) * Terra Gup 2 (TG-2) * Octo-Ray [[分类:海底小纵队]][[分类:动画]][[分类:第六季]] f46d9537edf41447de77b7f4d2b69851a7481b22 2006 2005 2023-07-16T06:53:02Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第六季</big><br><small>Octonauts: Above & Beyond Season 1</small> | image = Octonauts- Above & Beyond Netflix poster.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第六季(英文版)在Netflix上的海报 }} {{Simpleboxdata|label=集数|data=25(包含特别篇)}} {{Simpleboxdata|label=首播|data=2021年7月26日(CCTV)<br>2021年9月7日(Netflix)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第五季)]]}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第七季)]]}} |} '''海底小纵队动画第六季'''(Octonauts: Above & Beyond Season 1, otherwise known as Octonauts Season 6),是[[海底小纵队(动画剧集)|海底小纵队系列]]的第六部作品。 英文版将其及[[海底小纵队动画(第七季)|第七季]]、[[海底小纵队动画(第八季)|第八季]]作为与海底小纵队正篇完全独立的新剧集(衍生剧集),名叫“Above & Beyond”系列。该部分为“Above & Beyond”系列的第一季。第六季正式章节共24集,每集约11分钟左右。还有一个长达22分钟的特别篇。第六季也是第一次使用了“[[海底小纵队外派员|外派员]]”的概念。 It was confirmed on July 2, 2018 by Silvergate CEO and co-founder, Waheed Alli, and first reported by Variety: He hints at a new direction for the Octonauts. “It is going to see a departure from Seasons 1 to 5. We are driven by our own curiosity and wanted to go to other places.”<ref>{{cite web | title = "Octonauts" Movies Set For China and Netflix Release (EXCLUSIVE) - Va… | url = https://variety.com/2018/film/news/octonauts-movies-silvergate-china-expansion-wanda-1202860344/ | date = 2023-07-16 | archiveurl = http://archive.today/iVGY6 | archivedate = 2023-07-16 }}</ref> The debut series introduces the concept of "Terra Gups" which, unlike regular Gups, are used for traveling on land. It also introduces a new character, Paani. In addition, the Octo-Agents team is introduced, a group of characters scattered across the globe who can aid creatures anywhere. The Octo-Agents introduced in this season are mainly pre-established family members or friends of the Octonauts, including Min the Mapmaker from Season 5, Tracker, Professor Natquik, Ranger Marsh, and Koshi from Season 4, Pinto from Season 1, Ryla from The Caves of Sac Actun, Calico Jack from Season 2, and Pearl and Periwinkle from Season 3. It had its first episode premiere on the Octonauts YouTube channel on August 25th, 2021, and debuted as a Netflix Original series on September 7th 2021 worldwide. == Summary from website == Responding to a range of new dangers across our ever-changing planet, the Octonauts take their adventures beyond the sea and onto LAND! Enlisting their intrepid friends from around the globe as specialized Octo-Agents, and equipped with a new fleet of land-based Terra Gups, the Octonauts’ mission is as vital as ever: They will explore harsh and remote environments, rescue animals that need their help, and protect the land and all living creatures! == 剧集 == (待补充) == Trivia == This series will be multiple characters’ first time appearing in the show since their debut, including Ryla, Ranger Marsh, Min the Mapmaker, Tracker, Koshi, and more. Furthermore, due to Season 5’s delay in releasing Worldwide (excluding China), this is also Calico Jack, Pearl, Periwinkle, and Professor Natquik’s first time appearing again since their debut episodes in the original series. The only family-members of the crew that have yet to make a return are Bianca, her cubs, and Squirt. This series includes an aged-up Periwinkle, showcasing some sort of timeskip since he’s appeared last in Season 5. He has a new physical appearance, can talk in full sentences, and is currently attending “Sea Otter Scouts” whilst Pearl helps out on missions as an Octo-Agent. Though, once in a while, they'll talk to each other to say hello or ask for advice. Strangely, Above and Beyond is set to be released in English on Netflix before Season 5. This may pose an inconsistency with how Min the Mapmaker is introduced, since she appears twice in the first 26 episodes of the spinoff show. This will also affect Periwinkle’s new age-up, the introduction of the Gup R, Calico Jack's reintroduction, exc. Some characters have different voice actors in the US dub, whether due to Jenny Yokobori now voicing Dashi as of The Caves of Sac Actun (Koshi) along with Jo Wyatt as Tweak not being dubbed over anymore after the original show’s Season 1 (Pinto). The 6th episode of the original China airings, “The Cold Snap”, was replaced by “The Bamboo Rescue”, the 13th episode of Season 1 on Netflix. The Bamboo Rescue has also been excluded from the airings of Season 1 in China, along with all apperances of giant pandas within the show. It is currently unknown why it’s been censored overseas. The Cold Snap would eventually make it's english debut in the second season, but poses some continuity issues of Ranger Marsh not liking the Gup-K, nearly as much as he begun to in The Nine Banded Armadillo. Koshi and Pinto are categorized under “Junior Octo-Agents” due to their young age. Kwazii will be completely absent in some episodes, presumably due to him doing missions/travelling with Calico Jack. Additionally, other characters are shown to be absent in episodes, likely due to being out on missions. Shellington will wear a cave diving suit for the very first time. Paani makes his debut in this season as a brand new reoccurring character, aiding the Octonauts as an Octo-Agent. == Gups == * Terra Gup 1 (TG-1) * Terra Gup 2 (TG-2) * Octo-Ray [[分类:海底小纵队]][[分类:动画]][[分类:第六季]] dbdf1597deaf980925cf41e08fc41db4f4e68d0b 2007 2006 2023-07-16T07:02:00Z Richard Robin 2 修订错误 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第六季</big><br><small>Octonauts: Above & Beyond Season 1</small> | image = Octonauts- Above & Beyond Netflix poster.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第六季(英文版)在Netflix上的海报 }} {{Simpleboxdata|label=集数|data=25(包含特别篇)}} {{Simpleboxdata|label=首播|data=2021年7月26日(CCTV)<br>2021年9月7日(Netflix)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第五季)]]}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第七季)]]}} |} '''海底小纵队动画第六季'''(Octonauts: Above & Beyond Season 1, otherwise known as Octonauts Season 6),是[[海底小纵队(动画剧集)|海底小纵队系列]]的第六部作品。 英文版将其及[[海底小纵队动画(第七季)|第七季]]、[[海底小纵队动画(第八季)|第八季]]作为与海底小纵队正篇半独立的新剧集(衍生剧集),名叫“Above & Beyond”系列。该部分为“Above & Beyond”系列的第一季。第六季正式章节共24集,每集约11分钟左右。还有一个长达22分钟的特别篇。第六季也是第一次使用了“[[海底小纵队外派员|外派员]]”的概念。 It was confirmed on July 2, 2018 by Silvergate CEO and co-founder, Waheed Alli, and first reported by Variety: He hints at a new direction for the Octonauts. “It is going to see a departure from Seasons 1 to 5. We are driven by our own curiosity and wanted to go to other places.”<ref>{{cite web | title = "Octonauts" Movies Set For China and Netflix Release (EXCLUSIVE) - Va… | url = https://variety.com/2018/film/news/octonauts-movies-silvergate-china-expansion-wanda-1202860344/ | date = 2023-07-16 | archiveurl = http://archive.today/iVGY6 | archivedate = 2023-07-16 }}</ref> The debut series introduces the concept of "Terra Gups" which, unlike regular Gups, are used for traveling on land. It also introduces a new character, Paani. In addition, the Octo-Agents team is introduced, a group of characters scattered across the globe who can aid creatures anywhere. The Octo-Agents introduced in this season are mainly pre-established family members or friends of the Octonauts, including Min the Mapmaker from Season 5, Tracker, Professor Natquik, Ranger Marsh, and Koshi from Season 4, Pinto from Season 1, Ryla from The Caves of Sac Actun, Calico Jack from Season 2, and Pearl and Periwinkle from Season 3. It had its first episode premiere on the Octonauts YouTube channel on August 25th, 2021, and debuted as a Netflix Original series on September 7th 2021 worldwide. == Summary from website == Responding to a range of new dangers across our ever-changing planet, the Octonauts take their adventures beyond the sea and onto LAND! Enlisting their intrepid friends from around the globe as specialized Octo-Agents, and equipped with a new fleet of land-based Terra Gups, the Octonauts’ mission is as vital as ever: They will explore harsh and remote environments, rescue animals that need their help, and protect the land and all living creatures! == 剧集 == (待补充) == Trivia == This series will be multiple characters’ first time appearing in the show since their debut, including Ryla, Ranger Marsh, Min the Mapmaker, Tracker, Koshi, and more. Furthermore, due to Season 5’s delay in releasing Worldwide (excluding China), this is also Calico Jack, Pearl, Periwinkle, and Professor Natquik’s first time appearing again since their debut episodes in the original series. The only family-members of the crew that have yet to make a return are Bianca, her cubs, and Squirt. This series includes an aged-up Periwinkle, showcasing some sort of timeskip since he’s appeared last in Season 5. He has a new physical appearance, can talk in full sentences, and is currently attending “Sea Otter Scouts” whilst Pearl helps out on missions as an Octo-Agent. Though, once in a while, they'll talk to each other to say hello or ask for advice. Strangely, Above and Beyond is set to be released in English on Netflix before Season 5. This may pose an inconsistency with how Min the Mapmaker is introduced, since she appears twice in the first 26 episodes of the spinoff show. This will also affect Periwinkle’s new age-up, the introduction of the Gup R, Calico Jack's reintroduction, exc. Some characters have different voice actors in the US dub, whether due to Jenny Yokobori now voicing Dashi as of The Caves of Sac Actun (Koshi) along with Jo Wyatt as Tweak not being dubbed over anymore after the original show’s Season 1 (Pinto). The 6th episode of the original China airings, “The Cold Snap”, was replaced by “The Bamboo Rescue”, the 13th episode of Season 1 on Netflix. The Bamboo Rescue has also been excluded from the airings of Season 1 in China, along with all apperances of giant pandas within the show. It is currently unknown why it’s been censored overseas. The Cold Snap would eventually make it's english debut in the second season, but poses some continuity issues of Ranger Marsh not liking the Gup-K, nearly as much as he begun to in The Nine Banded Armadillo. Koshi and Pinto are categorized under “Junior Octo-Agents” due to their young age. Kwazii will be completely absent in some episodes, presumably due to him doing missions/travelling with Calico Jack. Additionally, other characters are shown to be absent in episodes, likely due to being out on missions. Shellington will wear a cave diving suit for the very first time. Paani makes his debut in this season as a brand new reoccurring character, aiding the Octonauts as an Octo-Agent. == Gups == * Terra Gup 1 (TG-1) * Terra Gup 2 (TG-2) * Octo-Ray [[分类:海底小纵队]][[分类:动画]][[分类:第六季]] caad43e723f5f2f1a8a26f008065d17921815281 海底小纵队(动画剧集) 0 14 2009 2008 2023-07-16T07:10:59Z Richard Robin 2 /* 介绍 */ wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>《海底小纵队》</big><br>''Octonauts'' | image = OctonautsTV.jpg | width = 300px | imgwidth = 300px | bgcolor = #a6dff7 | subtitle = 《海底小纵队》动画海报 }} {{Simpleboxdata|label=导演|data=达拉赫·奥康纳<br>尼基·费兰<br>瓦西里耶维奇·米科尔斯基}} {{Simpleboxdata|label=制片|data=黄向锐(中文版)}} {{Simpleboxdata|label=编剧|data=Silvergate Media}} {{Simpleboxdata|label=发行方|data=Silvergate Media}} {{Simpleboxdata|label=上映日期|data=2010年10月4日至今(英文版)<br /> 2014年5月13日至今(中文版)}} {{Simpleboxdata|label=电视平台|data=CBeebies(英国BBC少儿频道)首播<br> Disney Junior(美国)<br> ABC(澳大利亚)<br> CCTV-14(中国)<br> TF1(法国)<br> Super RTL(德国)}} {{Simpleboxdata|label=产地|data=英国、爱尔兰}} {{Simpleboxdata|label=语言|data=英语、日语、韩语、法语、俄语、<br/>汉语普通话(国语)等}} |} '''《海底小纵队》'''(''Octonauts''),是英国银色之门影视公司(Silvegate Media)于2010年开播(中国大陆2014年开播)的儿童动画片,该作品改编自加拿大设计工作室Meomi的同名系列绘本。<br /> 该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及团队协作等内容。动画讲述了八个可爱的拟人化小动物组成的海底探险小队的故事。以巴克队长为领导核心,小队集结了医生、生物学家、摄影师、机械工程师等7名伙伴。他们是一群活跃在海底的冒险家,有着各自的爱好与独特的特长,在队长的带领下向着未知的海域不断探索前进。<br /> 目前海底小纵队在中国大陆的版权持有方是万达集团下属的万达宝贝王。 《海底小纵队》在世界已播出第一季50集、第二季22集、第三季20集、第四季26集、第五季27集、第六季26集、第七季26集。 == 介绍 == 《海底小纵队》是英国silvergate公司(银色大门)与俄罗斯开心球友好签约的旗下作品。该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及学龄前团队协作等内容。动画讲述了八个可爱小动物组成的海底探险小队的故事。他们居住在神秘基地——章鱼堡,随时准备出发去解决海底遇险、排除海底可能发生的危险。 <del>然后每集任务结束后就会来个名叫《[[海底报告]]》的尬舞+唱歌,可以听到巴克队长美妙的歌喉。</del>每集的海底报告歌词都不太一样。 每集动画都建立在一次探险的基础之上,小队成员发挥自己的特殊本领,克服险境,探索海洋奥妙,发现未知生物。 == 主题曲<ref>这里引用的是[[海底小纵队动画片第一季|动画剧集第一季]]的片头,有关于其他剧集的片头可以阅读其他词条。</ref> == === Youtube视频(需翻墙) === [[Video:海底小纵队主题曲(配视频)|800px]] === 音频(墙内特供) === [[File:Octonauts Theme Tune.mp3]] == 相关链接 == * [[海底小纵队动画(第一季)]] * [[海底小纵队动画(第二季)]] * [[海底小纵队动画(第三季)]] * [[海底小纵队动画(第四季)]] * [[海底小纵队动画(第五季)]] * [[海底小纵队动画(第六季)]] * [[海底小纵队动画(第七季)]] * [[海底小纵队动画(第八季)]] [[分类:海底小纵队]][[分类:动画]] c4aeeeb4d0412302fb5c60f94a2bfe62b113c6af 2031 2009 2023-07-18T18:04:18Z Richard Robin 2 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>《海底小纵队》</big><br>''Octonauts'' | image = OctonautsTV.jpg | width = 300px | imgwidth = 300px | bgcolor = #a6dff7 | subtitle = 《海底小纵队》动画海报 }} {{Simpleboxdata|label=导演|data=达拉赫·奥康纳<br>尼基·费兰<br>瓦西里耶维奇·米科尔斯基}} {{Simpleboxdata|label=制片|data=黄向锐(中文版)}} {{Simpleboxdata|label=编剧|data=Silvergate Media}} {{Simpleboxdata|label=发行方|data=Silvergate Media}} {{Simpleboxdata|label=上映日期|data=2010年10月4日至今(英文版)<br /> 2014年5月13日至今(中文版)}} {{Simpleboxdata|label=电视平台|data=CBeebies(英国BBC少儿频道)首播<br> Disney Junior(美国)<br> ABC(澳大利亚)<br> CCTV-14(中国)<br> TF1(法国)<br> Super RTL(德国)}} {{Simpleboxdata|label=产地|data=英国、爱尔兰}} {{Simpleboxdata|label=语言|data=英语、日语、韩语、法语、俄语、<br/>汉语普通话(国语)等}} |} '''《海底小纵队》'''(''Octonauts''),是英国银色之门影视公司(Silvegate Media)于2010年开播(中国大陆2014年开播)的儿童动画片,该作品改编自加拿大设计工作室Meomi的同名系列绘本。<br /> 该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及团队协作等内容。动画讲述了八个可爱的拟人化小动物组成的海底探险小队的故事。以巴克队长为领导核心,小队集结了医生、生物学家、摄影师、机械工程师等7名伙伴。他们是一群活跃在海底的冒险家,有着各自的爱好与独特的特长,在队长的带领下向着未知的海域不断探索前进。<br /> 目前海底小纵队在中国大陆的版权持有方是万达集团下属的万达宝贝王。 《海底小纵队》在世界已播出第一季50集、第二季22集、第三季20集、第四季26集、第五季27集、第六季26集、第七季26集。 == 介绍 == 《海底小纵队》是英国silvergate公司(银色大门)与俄罗斯开心球友好签约的旗下作品。该片以海洋作为故事上演的舞台,融合了动作、探险、海洋生物科学课程以及学龄前团队协作等内容。动画讲述了八个可爱小动物组成的海底探险小队的故事。他们居住在神秘基地——章鱼堡,随时准备出发去解决海底遇险、排除海底可能发生的危险。 <del>然后每集任务结束后就会来个名叫《[[海底报告]]》的尬舞+唱歌,可以听到巴克队长美妙的歌喉。</del>每集的海底报告歌词都不太一样。 每集动画都建立在一次探险的基础之上,小队成员发挥自己的特殊本领,克服险境,探索海洋奥妙,发现未知生物。 == 主题曲<ref>这里引用的是[[海底小纵队动画片第一季|动画剧集第一季]]的片头,有关于其他剧集的片头可以阅读其他词条。</ref> == === Youtube视频(需翻墙) === [[Video:海底小纵队主题曲(配视频)|800px]] === 音频(墙内特供) === [[File:Octonauts Theme Tune.mp3]] == 相关链接 == * [[海底小纵队动画(第一季)]] * [[海底小纵队动画(第二季)]] * [[海底小纵队动画(第三季)]] * [[海底小纵队动画(第四季)]] * [[海底小纵队动画(第五季)]] * [[海底小纵队动画(第六季)]] * [[海底小纵队动画(第七季)]] * [[海底小纵队动画(第八季)]] {{海底小纵队动画总览}} [[分类:海底小纵队]][[分类:动画]] e65a321a056a1d0ee0d03e36580e440e5e7161d9 File:海底小纵队第七季中文版宣传图.jpg 6 1013 2010 2023-07-16T12:27:27Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 海底小纵队动画(第七季) 0 1014 2011 2023-07-16T12:29:28Z Richard Robin 2 创建页面,内容为“{{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第七季</big><br><small>Octonauts: Above & Beyond Season 2</small> | image = 海底小纵队第七季中文版宣传图.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第七季中文版宣传图 }} {{Simpleboxdata|label=集数|data=25(包含特别篇)}} {{Simpleboxdata|label=首播|data…” wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第七季</big><br><small>Octonauts: Above & Beyond Season 2</small> | image = 海底小纵队第七季中文版宣传图.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第七季中文版宣传图 }} {{Simpleboxdata|label=集数|data=25(包含特别篇)}} {{Simpleboxdata|label=首播|data=2022年5月2日(英文版)<br>2022年5月27日(中文版)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第六季)]]}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第八季)]]}} |} Octonauts: Above & Beyond Season 2, otherwise known as Octonauts Season 7, is the second season of Octonauts: Above & Beyond, a spin-off of the original Octonauts series. The season contains 24 11-minute episodes, as well as a 22-minute special. It was confirmed in 2021 for the following year, with a worldwide Netflix release date on May 2nd, 2022 confirmed as of April 4th, 2022. With the announcement brought a new 1-minute clip including Captain Barnacles, Kwazii, Tweak, and Min on a mission atop a bridge with the TG-1 carrying a scratching tree belonging to a sun bear, Atif. The 22-minute episode The Rainforest Rescue also got an early release on April 18th, 2022 on the Netflix Jr. Youtube channel. == Gups == * TG-1 * TG-2 * TG-3 * TG-4 * TG-5 == Trivia == This is the first piece/season of any Octonauts animated media to not have Stephanie Simpson on the writing team or as an executive producer anymore. Taking her place as Head Writer in this season is Marty Isenberg, who began working on the show’s writing team in Above & Beyond Season 1 prior to his promotion. According to the series’ information page on Netflix, 3 additional cast members had joined the show for the upcoming season. One new cast member in particular, Shala Nyx, had been previously rumoured to voice a character named Akita in “The Octonauts and the Mystery Island”, an unintentional placeholder name used to represent the Above & Beyond series in early 2021. The other former placeholder series name, “The Octonauts and the Arabian Camels”, makes a return as well. Shala Nyx is listed again as a different character, Samira, along with another new cast member confirmed to be involved with Above & Beyond Season 2. It can be assumed that both of these names were internal leaks of what are new Above & Beyond episodes, instead of stand alone series. An episode from the original China airing of season 1, “The Cold Snap”, is now included in season 2 after it was replaced by “The Bamboo Rescue” in Season 1’s Netflix release. As a result this causes some continuity issues with Ranger Marsh not yet being used to the Gup-K. The TG-3, TG-4, and TG-5 GUPs make their proper physical debut in this season, after first appearing in the credits artwork of the previous season. In The Rainforest Rescue, Professor Inkling seems to be slightly more comfortable with getting out of the Octopod more often, much like in The Siberian Salamander, especially to be with Min. Many characters get noticeably more appearances this season compared to the previous one, including Captain Barnacles, Kwazii, Tweak, Ranger Marsh, and Pearl. Some characters also get slightly less or even a complete lack of screen-time this season, such as Paani and Pinto. [[分类:海底小纵队]][[分类:动画]][[分类:第七季]] 7e6014da1ba6fb2419179a90de8e0a8894e6fa46 2035 2011 2023-07-18T18:06:16Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第七季</big><br><small>Octonauts: Above & Beyond Season 2</small> | image = 海底小纵队第七季中文版宣传图.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第七季中文版宣传图 }} {{Simpleboxdata|label=集数|data=25(包含特别篇)}} {{Simpleboxdata|label=首播|data=2022年5月2日(英文版)<br>2022年5月27日(中文版)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第六季)]]}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第八季)]]}} |} Octonauts: Above & Beyond Season 2, otherwise known as Octonauts Season 7, is the second season of Octonauts: Above & Beyond, a spin-off of the original Octonauts series. The season contains 24 11-minute episodes, as well as a 22-minute special. It was confirmed in 2021 for the following year, with a worldwide Netflix release date on May 2nd, 2022 confirmed as of April 4th, 2022. With the announcement brought a new 1-minute clip including Captain Barnacles, Kwazii, Tweak, and Min on a mission atop a bridge with the TG-1 carrying a scratching tree belonging to a sun bear, Atif. The 22-minute episode The Rainforest Rescue also got an early release on April 18th, 2022 on the Netflix Jr. Youtube channel. == Gups == * TG-1 * TG-2 * TG-3 * TG-4 * TG-5 == Trivia == This is the first piece/season of any Octonauts animated media to not have Stephanie Simpson on the writing team or as an executive producer anymore. Taking her place as Head Writer in this season is Marty Isenberg, who began working on the show’s writing team in Above & Beyond Season 1 prior to his promotion. According to the series’ information page on Netflix, 3 additional cast members had joined the show for the upcoming season. One new cast member in particular, Shala Nyx, had been previously rumoured to voice a character named Akita in “The Octonauts and the Mystery Island”, an unintentional placeholder name used to represent the Above & Beyond series in early 2021. The other former placeholder series name, “The Octonauts and the Arabian Camels”, makes a return as well. Shala Nyx is listed again as a different character, Samira, along with another new cast member confirmed to be involved with Above & Beyond Season 2. It can be assumed that both of these names were internal leaks of what are new Above & Beyond episodes, instead of stand alone series. An episode from the original China airing of season 1, “The Cold Snap”, is now included in season 2 after it was replaced by “The Bamboo Rescue” in Season 1’s Netflix release. As a result this causes some continuity issues with Ranger Marsh not yet being used to the Gup-K. The TG-3, TG-4, and TG-5 GUPs make their proper physical debut in this season, after first appearing in the credits artwork of the previous season. In The Rainforest Rescue, Professor Inkling seems to be slightly more comfortable with getting out of the Octopod more often, much like in The Siberian Salamander, especially to be with Min. Many characters get noticeably more appearances this season compared to the previous one, including Captain Barnacles, Kwazii, Tweak, Ranger Marsh, and Pearl. Some characters also get slightly less or even a complete lack of screen-time this season, such as Paani and Pinto. {{海底小纵队动画总览}} [[分类:海底小纵队]][[分类:动画]][[分类:第七季]] 99ded8a81fff29f8e1573f6aa77a81915fd74b4e 海底小纵队动画(第六季) 0 1012 2012 2007 2023-07-16T12:30:33Z Richard Robin 2 /* Trivia */ wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第六季</big><br><small>Octonauts: Above & Beyond Season 1</small> | image = Octonauts- Above & Beyond Netflix poster.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第六季(英文版)在Netflix上的海报 }} {{Simpleboxdata|label=集数|data=25(包含特别篇)}} {{Simpleboxdata|label=首播|data=2021年7月26日(CCTV)<br>2021年9月7日(Netflix)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第五季)]]}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第七季)]]}} |} '''海底小纵队动画第六季'''(Octonauts: Above & Beyond Season 1, otherwise known as Octonauts Season 6),是[[海底小纵队(动画剧集)|海底小纵队系列]]的第六部作品。 英文版将其及[[海底小纵队动画(第七季)|第七季]]、[[海底小纵队动画(第八季)|第八季]]作为与海底小纵队正篇半独立的新剧集(衍生剧集),名叫“Above & Beyond”系列。该部分为“Above & Beyond”系列的第一季。第六季正式章节共24集,每集约11分钟左右。还有一个长达22分钟的特别篇。第六季也是第一次使用了“[[海底小纵队外派员|外派员]]”的概念。 It was confirmed on July 2, 2018 by Silvergate CEO and co-founder, Waheed Alli, and first reported by Variety: He hints at a new direction for the Octonauts. “It is going to see a departure from Seasons 1 to 5. We are driven by our own curiosity and wanted to go to other places.”<ref>{{cite web | title = "Octonauts" Movies Set For China and Netflix Release (EXCLUSIVE) - Va… | url = https://variety.com/2018/film/news/octonauts-movies-silvergate-china-expansion-wanda-1202860344/ | date = 2023-07-16 | archiveurl = http://archive.today/iVGY6 | archivedate = 2023-07-16 }}</ref> The debut series introduces the concept of "Terra Gups" which, unlike regular Gups, are used for traveling on land. It also introduces a new character, Paani. In addition, the Octo-Agents team is introduced, a group of characters scattered across the globe who can aid creatures anywhere. The Octo-Agents introduced in this season are mainly pre-established family members or friends of the Octonauts, including Min the Mapmaker from Season 5, Tracker, Professor Natquik, Ranger Marsh, and Koshi from Season 4, Pinto from Season 1, Ryla from The Caves of Sac Actun, Calico Jack from Season 2, and Pearl and Periwinkle from Season 3. It had its first episode premiere on the Octonauts YouTube channel on August 25th, 2021, and debuted as a Netflix Original series on September 7th 2021 worldwide. == Summary from website == Responding to a range of new dangers across our ever-changing planet, the Octonauts take their adventures beyond the sea and onto LAND! Enlisting their intrepid friends from around the globe as specialized Octo-Agents, and equipped with a new fleet of land-based Terra Gups, the Octonauts’ mission is as vital as ever: They will explore harsh and remote environments, rescue animals that need their help, and protect the land and all living creatures! == 剧集 == (待补充) == Trivia == This series will be multiple characters’ first time appearing in the show since their debut, including Ryla, Ranger Marsh, Min the Mapmaker, Tracker, Koshi, and more. Furthermore, due to Season 5’s delay in releasing Worldwide (excluding China), this is also Calico Jack, Pearl, Periwinkle, and Professor Natquik’s first time appearing again since their debut episodes in the original series. The only family-members of the crew that have yet to make a return are Bianca, her cubs, and Squirt. This series includes an aged-up Periwinkle, showcasing some sort of timeskip since he’s appeared last in Season 5. He has a new physical appearance, can talk in full sentences, and is currently attending “Sea Otter Scouts” whilst Pearl helps out on missions as an Octo-Agent. Though, once in a while, they'll talk to each other to say hello or ask for advice. Strangely, Above and Beyond is set to be released in English on Netflix before Season 5. This may pose an inconsistency with how Min the Mapmaker is introduced, since she appears twice in the first 26 episodes of the spinoff show. This will also affect Periwinkle’s new age-up, the introduction of the Gup R, Calico Jack's reintroduction, exc. Some characters have different voice actors in the US dub, whether due to Jenny Yokobori now voicing Dashi as of The Caves of Sac Actun (Koshi) along with Jo Wyatt as Tweak not being dubbed over anymore after the original show’s Season 1 (Pinto). The 6th episode of the original China airings, “The Cold Snap”, was replaced by “The Bamboo Rescue”, the 13th episode of Season 1 on Netflix. The Bamboo Rescue has also been excluded from the airings of Season 1 in China, along with all apperances of giant pandas within the show. It is currently unknown why it’s been censored overseas. The Cold Snap would eventually make it's english debut in the second season, but poses some continuity issues of Ranger Marsh not liking the Gup-K, nearly as much as he begun to in The Nine Banded Armadillo. Koshi and Pinto are categorized under “Junior Octo-Agents” due to their young age. Kwazii will be completely absent in some episodes, presumably due to him doing missions/travelling with Calico Jack. Additionally, other characters are shown to be absent in episodes, likely due to being out on missions. Shellington will wear a cave diving suit for the very first time. Paani makes his debut in this season as a brand new reoccurring character, aiding the Octonauts as an Octo-Agent. == Gups == * Terra Gup 1 (TG-1) * Terra Gup 2 (TG-2) * Octo-Ray [[分类:海底小纵队]][[分类:动画]][[分类:第六季]] 7d11c677fdcdc1e2fcc738fc4326c91adfff6f78 2034 2012 2023-07-18T18:06:08Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第六季</big><br><small>Octonauts: Above & Beyond Season 1</small> | image = Octonauts- Above & Beyond Netflix poster.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第六季(英文版)在Netflix上的海报 }} {{Simpleboxdata|label=集数|data=25(包含特别篇)}} {{Simpleboxdata|label=首播|data=2021年7月26日(CCTV)<br>2021年9月7日(Netflix)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第五季)]]}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第七季)]]}} |} '''海底小纵队动画第六季'''(Octonauts: Above & Beyond Season 1, otherwise known as Octonauts Season 6),是[[海底小纵队(动画剧集)|海底小纵队系列]]的第六部作品。 英文版将其及[[海底小纵队动画(第七季)|第七季]]、[[海底小纵队动画(第八季)|第八季]]作为与海底小纵队正篇半独立的新剧集(衍生剧集),名叫“Above & Beyond”系列。该部分为“Above & Beyond”系列的第一季。第六季正式章节共24集,每集约11分钟左右。还有一个长达22分钟的特别篇。第六季也是第一次使用了“[[海底小纵队外派员|外派员]]”的概念。 It was confirmed on July 2, 2018 by Silvergate CEO and co-founder, Waheed Alli, and first reported by Variety: He hints at a new direction for the Octonauts. “It is going to see a departure from Seasons 1 to 5. We are driven by our own curiosity and wanted to go to other places.”<ref>{{cite web | title = "Octonauts" Movies Set For China and Netflix Release (EXCLUSIVE) - Va… | url = https://variety.com/2018/film/news/octonauts-movies-silvergate-china-expansion-wanda-1202860344/ | date = 2023-07-16 | archiveurl = http://archive.today/iVGY6 | archivedate = 2023-07-16 }}</ref> The debut series introduces the concept of "Terra Gups" which, unlike regular Gups, are used for traveling on land. It also introduces a new character, Paani. In addition, the Octo-Agents team is introduced, a group of characters scattered across the globe who can aid creatures anywhere. The Octo-Agents introduced in this season are mainly pre-established family members or friends of the Octonauts, including Min the Mapmaker from Season 5, Tracker, Professor Natquik, Ranger Marsh, and Koshi from Season 4, Pinto from Season 1, Ryla from The Caves of Sac Actun, Calico Jack from Season 2, and Pearl and Periwinkle from Season 3. It had its first episode premiere on the Octonauts YouTube channel on August 25th, 2021, and debuted as a Netflix Original series on September 7th 2021 worldwide. == Summary from website == Responding to a range of new dangers across our ever-changing planet, the Octonauts take their adventures beyond the sea and onto LAND! Enlisting their intrepid friends from around the globe as specialized Octo-Agents, and equipped with a new fleet of land-based Terra Gups, the Octonauts’ mission is as vital as ever: They will explore harsh and remote environments, rescue animals that need their help, and protect the land and all living creatures! == 剧集 == (待补充) == Trivia == This series will be multiple characters’ first time appearing in the show since their debut, including Ryla, Ranger Marsh, Min the Mapmaker, Tracker, Koshi, and more. Furthermore, due to Season 5’s delay in releasing Worldwide (excluding China), this is also Calico Jack, Pearl, Periwinkle, and Professor Natquik’s first time appearing again since their debut episodes in the original series. The only family-members of the crew that have yet to make a return are Bianca, her cubs, and Squirt. This series includes an aged-up Periwinkle, showcasing some sort of timeskip since he’s appeared last in Season 5. He has a new physical appearance, can talk in full sentences, and is currently attending “Sea Otter Scouts” whilst Pearl helps out on missions as an Octo-Agent. Though, once in a while, they'll talk to each other to say hello or ask for advice. Strangely, Above and Beyond is set to be released in English on Netflix before Season 5. This may pose an inconsistency with how Min the Mapmaker is introduced, since she appears twice in the first 26 episodes of the spinoff show. This will also affect Periwinkle’s new age-up, the introduction of the Gup R, Calico Jack's reintroduction, exc. Some characters have different voice actors in the US dub, whether due to Jenny Yokobori now voicing Dashi as of The Caves of Sac Actun (Koshi) along with Jo Wyatt as Tweak not being dubbed over anymore after the original show’s Season 1 (Pinto). The 6th episode of the original China airings, “The Cold Snap”, was replaced by “The Bamboo Rescue”, the 13th episode of Season 1 on Netflix. The Bamboo Rescue has also been excluded from the airings of Season 1 in China, along with all apperances of giant pandas within the show. It is currently unknown why it’s been censored overseas. The Cold Snap would eventually make it's english debut in the second season, but poses some continuity issues of Ranger Marsh not liking the Gup-K, nearly as much as he begun to in The Nine Banded Armadillo. Koshi and Pinto are categorized under “Junior Octo-Agents” due to their young age. Kwazii will be completely absent in some episodes, presumably due to him doing missions/travelling with Calico Jack. Additionally, other characters are shown to be absent in episodes, likely due to being out on missions. Shellington will wear a cave diving suit for the very first time. Paani makes his debut in this season as a brand new reoccurring character, aiding the Octonauts as an Octo-Agent. == Gups == * Terra Gup 1 (TG-1) * Terra Gup 2 (TG-2) * Octo-Ray {{海底小纵队动画总览}} [[分类:海底小纵队]][[分类:动画]][[分类:第六季]] 4dcbd7ba52d80ad541eb7599cdbb21d0eb9b9fd5 File:海底小纵队第八季中文版宣传图.jpg 6 1015 2013 2023-07-16T12:37:16Z Richard Robin 2 wikitext text/x-wiki == 许可协议 == {{Copyright}} 83d0116b5350c03efd9f326adec6c3c0fa23f01b 海底小纵队动画(第八季) 0 1016 2014 2023-07-16T12:39:09Z Richard Robin 2 创建页面,内容为“{{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第八季</big><br><small>Octonauts: Above & Beyond Season 3</small> | image = 海底小纵队第八季中文版宣传图.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第八季中文版宣传图 }} {{Simpleboxdata|label=集数|data=26(不包含特别篇)<ref>特别篇仅限韩国播出…” wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第八季</big><br><small>Octonauts: Above & Beyond Season 3</small> | image = 海底小纵队第八季中文版宣传图.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第八季中文版宣传图 }} {{Simpleboxdata|label=集数|data=26(不包含特别篇)<ref>特别篇仅限韩国播出。</ref>}} {{Simpleboxdata|label=首播|data=2023年5月26日(中文版)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第七季)]]}} {{Simpleboxdata|label=下一季|data=当前最新}} |} Octonauts: Above & Beyond Season 3, otherwise known as Octonauts Season 8, is the upcoming third season of Octonauts: Above & Beyond, a spin-off of the original Octonauts series. It is speculated to release on Netflix during the summer of 2023. It made its first premiere in China on May 26th, 2023, and concluded its airings on June 7th, 2023. Its recent teasers derive from the Chinese and Korean Octonauts social media accounts. The season will contain 26 11-minute episodes, and 1 upcoming special (only in Korean airings). == Gups == * TG-1 * TG-2 * TG-3 * TG-4 * TG-5 * TG-6 (Debut) * TG-7 (Debut) * TG-8 (Debuts in upcoming special) * Octo-Mite (Debut) * Octo-Blimp (Debut) == Trivia == Whilst China’s airings of the season contained 26 11-minute episodes and no longer specials, the Korean airings appear to have a new special and potentially other completely new upcoming episodes that were not seen prior. It is unknown why this is happening and if every episode from both regions premieres will be present in the seasons Netflix release. The upcoming special in question involves Selva, as well as the brand new Terra-Gup 8, taking on the appearance of an elephant, and seems to be used as a mobile greenhouse. Other shots that are unseen in China’s episode airings include a shot of Tweak in the seasons Chinese intro, as well as some footage from the Korean trailer for the season. One episode from the upcoming season premiered in China in July 2022 as a part of their airings of Above and Beyond Season 2. This is a similar situation to how The Cold Snap, an episode from the aforementioned A&B season, had an early release in China’s initial airings of Above and Beyond Season 1 in place of The Bamboo Rescue. More Terra-Gups are likely to be introduced this season. One appears in a poster (the Octo-Mite), and seems to be based on an Ant/termite. It’s likely its special feature, is to be able to shrink in size, or be used as a robotic assistant. In February 2023, the sound designers for the series confirmed that they had just begun working on the new season, establishing that Season 3 is currently in post-production. After making no appearances in Above & Beyond Season 2, Pinto will reappear in this season. The Beaver family from the Season 5 episode The Beavers seems to be returning at some point this season. This would be their English debut in the series, due to Season 5 being currently incomplete in its English airings. It’s confirmed via teaser posters and footage that Bud the beaver will become a Junior Octo-Agent. However, the rest of his family seems excluded from the program. Alongside them, a brand new reptilian-esque character made exclusively for this series (similar to Paani) will also be joining the main cast of Octo-Agents. Her name appears to be Selva, with her job being that of a botanist. It is also rumoured that she may have some knowledge on where the Vegimals came from. She and Min, are the only characters in the series with eyelashes. Footage from the 5/5 trailer appears to include the following significant details: An updated intro to the show, now including Bud and Selva lined up with the rest of the Octo-Agents. Captain Barnacles, Dashi, Tweak, and Tracker (located inside of the Octo-Ray) painting the TG-6. Tweak sending off the Octo-Mite, into a den, of Termites. Bud can be seen on screen, meaning this gup's purpose is to observe bug habitats. Peso driving the TG-4 across the water to save Pinto from sharks. A hint at an episode taking place during Captain Barnacles’ birthday, as there is a huge cake, confetti, and presents from the other Octonauts, including Selva, which is shown in a few shots. Shellington in the TG-1 traversing through an environment with fields of pink flowers. He gets out and interacts with Selva, as the Vegimals wander around freely. Tunip can be seen wearing a hat and something else around his neck. Selva is leaned down petting Tomminow while conversing with someone (presumably Shellington) off-screen. Bud with a type of ant-eater. Kwazii being attacked by a snake. Kwazii and Calico Jack in the Gup-R, encountering a group of Man O'War Jellyfish. In the thumbnail for the 5/5 trailer, Periwinkle is shown wearing an oversized cowboy hat. A 15-minute video on the season has been found online. Unfortunately, the video itself is currently inaccessible, with no reposts so far. However, two thumbnail screenshots have been shown: The first image shows Kwazii, Peso, and Tweak outside of two tents at night. The second images shows Ranger Marsh meeting another Man O'War Jellyfish. From the same website as the aforementioned video, two more videos roughly around 1-minute released on 5/22. The thumbnails showcase a closer look at Captain Barnacles and Tracker Flying the TG-6, as well as Shellington accompanied by the Vegimals talking to Selva. Many episodes in this season only feature members of the main Octonauts team. Many characters get noticeably more appearances this season compared to the previous one, including Captain Barnacles, Kwazii, and Peso. This mainly applies to the Octonauts, and less so the Octo-Agents. Some characters also get slightly less screen-time this season, such as Min the Mapmaker, Pinto, and Tracker. Some even had a complete lack of major screen-time this season, such as Professor Natquik (who shows up for a minute in 1 episode) and Ryla, who makes no new appearances this season. Orson and Ursa appear for the first time since Season 4 of the original Octonauts series, but with no appearance from Bianca. [[分类:海底小纵队]][[分类:动画]][[分类:第八季]] 4d810c63665c1a99359019904041b28c9999ceae 2036 2014 2023-07-18T18:06:26Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = [[File:Octonauts- Above & Beyond Logo.png|300px|center]] | toptext = <big>海底小纵队第八季</big><br><small>Octonauts: Above & Beyond Season 3</small> | image = 海底小纵队第八季中文版宣传图.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = 海底小纵队第八季中文版宣传图 }} {{Simpleboxdata|label=集数|data=26(不包含特别篇)<ref>特别篇仅限韩国播出。</ref>}} {{Simpleboxdata|label=首播|data=2023年5月26日(中文版)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第七季)]]}} {{Simpleboxdata|label=下一季|data=当前最新}} |} Octonauts: Above & Beyond Season 3, otherwise known as Octonauts Season 8, is the upcoming third season of Octonauts: Above & Beyond, a spin-off of the original Octonauts series. It is speculated to release on Netflix during the summer of 2023. It made its first premiere in China on May 26th, 2023, and concluded its airings on June 7th, 2023. Its recent teasers derive from the Chinese and Korean Octonauts social media accounts. The season will contain 26 11-minute episodes, and 1 upcoming special (only in Korean airings). == Gups == * TG-1 * TG-2 * TG-3 * TG-4 * TG-5 * TG-6 (Debut) * TG-7 (Debut) * TG-8 (Debuts in upcoming special) * Octo-Mite (Debut) * Octo-Blimp (Debut) == Trivia == Whilst China’s airings of the season contained 26 11-minute episodes and no longer specials, the Korean airings appear to have a new special and potentially other completely new upcoming episodes that were not seen prior. It is unknown why this is happening and if every episode from both regions premieres will be present in the seasons Netflix release. The upcoming special in question involves Selva, as well as the brand new Terra-Gup 8, taking on the appearance of an elephant, and seems to be used as a mobile greenhouse. Other shots that are unseen in China’s episode airings include a shot of Tweak in the seasons Chinese intro, as well as some footage from the Korean trailer for the season. One episode from the upcoming season premiered in China in July 2022 as a part of their airings of Above and Beyond Season 2. This is a similar situation to how The Cold Snap, an episode from the aforementioned A&B season, had an early release in China’s initial airings of Above and Beyond Season 1 in place of The Bamboo Rescue. More Terra-Gups are likely to be introduced this season. One appears in a poster (the Octo-Mite), and seems to be based on an Ant/termite. It’s likely its special feature, is to be able to shrink in size, or be used as a robotic assistant. In February 2023, the sound designers for the series confirmed that they had just begun working on the new season, establishing that Season 3 is currently in post-production. After making no appearances in Above & Beyond Season 2, Pinto will reappear in this season. The Beaver family from the Season 5 episode The Beavers seems to be returning at some point this season. This would be their English debut in the series, due to Season 5 being currently incomplete in its English airings. It’s confirmed via teaser posters and footage that Bud the beaver will become a Junior Octo-Agent. However, the rest of his family seems excluded from the program. Alongside them, a brand new reptilian-esque character made exclusively for this series (similar to Paani) will also be joining the main cast of Octo-Agents. Her name appears to be Selva, with her job being that of a botanist. It is also rumoured that she may have some knowledge on where the Vegimals came from. She and Min, are the only characters in the series with eyelashes. Footage from the 5/5 trailer appears to include the following significant details: An updated intro to the show, now including Bud and Selva lined up with the rest of the Octo-Agents. Captain Barnacles, Dashi, Tweak, and Tracker (located inside of the Octo-Ray) painting the TG-6. Tweak sending off the Octo-Mite, into a den, of Termites. Bud can be seen on screen, meaning this gup's purpose is to observe bug habitats. Peso driving the TG-4 across the water to save Pinto from sharks. A hint at an episode taking place during Captain Barnacles’ birthday, as there is a huge cake, confetti, and presents from the other Octonauts, including Selva, which is shown in a few shots. Shellington in the TG-1 traversing through an environment with fields of pink flowers. He gets out and interacts with Selva, as the Vegimals wander around freely. Tunip can be seen wearing a hat and something else around his neck. Selva is leaned down petting Tomminow while conversing with someone (presumably Shellington) off-screen. Bud with a type of ant-eater. Kwazii being attacked by a snake. Kwazii and Calico Jack in the Gup-R, encountering a group of Man O'War Jellyfish. In the thumbnail for the 5/5 trailer, Periwinkle is shown wearing an oversized cowboy hat. A 15-minute video on the season has been found online. Unfortunately, the video itself is currently inaccessible, with no reposts so far. However, two thumbnail screenshots have been shown: The first image shows Kwazii, Peso, and Tweak outside of two tents at night. The second images shows Ranger Marsh meeting another Man O'War Jellyfish. From the same website as the aforementioned video, two more videos roughly around 1-minute released on 5/22. The thumbnails showcase a closer look at Captain Barnacles and Tracker Flying the TG-6, as well as Shellington accompanied by the Vegimals talking to Selva. Many episodes in this season only feature members of the main Octonauts team. Many characters get noticeably more appearances this season compared to the previous one, including Captain Barnacles, Kwazii, and Peso. This mainly applies to the Octonauts, and less so the Octo-Agents. Some characters also get slightly less screen-time this season, such as Min the Mapmaker, Pinto, and Tracker. Some even had a complete lack of major screen-time this season, such as Professor Natquik (who shows up for a minute in 1 episode) and Ryla, who makes no new appearances this season. Orson and Ursa appear for the first time since Season 4 of the original Octonauts series, but with no appearance from Bianca. {{海底小纵队动画总览}} [[分类:海底小纵队]][[分类:动画]][[分类:第八季]] b8384b1c44a391fc19db25f38289da743d9970b0 海底小纵队动画(第一季) 0 1017 2015 2023-07-16T12:52:45Z Richard Robin 2 创建页面,内容为“{{需要翻译}} {{Simpleboxtop | title = [[File:OCTONAUTS.png|300px|center]] | toptext = <big>海底小纵队第一季</big><br>Octonauts Season 1 | image = OctonautsTV.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = }} {{Simpleboxdata|label=集数|data=52(包含两集特别篇)}} {{Simpleboxdata|label=首播|data=2010年10月4日(英文版)<br>2014年5月13日(中文版)}} {{Simpleboxdata|label=上一季|data=海底小…” wikitext text/x-wiki {{需要翻译}} {{Simpleboxtop | title = [[File:OCTONAUTS.png|300px|center]] | toptext = <big>海底小纵队第一季</big><br>Octonauts Season 1 | image = OctonautsTV.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = }} {{Simpleboxdata|label=集数|data=52(包含两集特别篇)}} {{Simpleboxdata|label=首播|data=2010年10月4日(英文版)<br>2014年5月13日(中文版)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第五季)]]}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第七季)]]}} |} '''海底小纵队第一季'''(Octonauts Season 1)是[[海底小纵队(动画剧集)|海底小纵队系列]]的第一部作品。于2010年10月4日在英国CBeebies上首播(中文版于2014年5月13日在央视等平台首播)。第一季季包含50集11分钟的剧集,以及两集22分钟的特别篇。 This season debuts the Gup-A, Gup-B, Gup-C, Gup-D, and Gup-E, the five main Gups used primarily throughout the series. Also introduced is the Gup-F (The Speedy Sailfish), an unfinished prototype Gup, and the Gup-X (The Great Christmas Rescue), which is used frequently in following seasons. == Episodes == (待更新) [[分类:海底小纵队]][[分类:动画]][[分类:第一季]] 20af7e2d2923ad538ed4d8cf9b9dc42f90d0f183 2016 2015 2023-07-16T12:53:03Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} {{需要补充}} {{Simpleboxtop | title = [[File:OCTONAUTS.png|300px|center]] | toptext = <big>海底小纵队第一季</big><br>Octonauts Season 1 | image = OctonautsTV.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = }} {{Simpleboxdata|label=集数|data=52(包含两集特别篇)}} {{Simpleboxdata|label=首播|data=2010年10月4日(英文版)<br>2014年5月13日(中文版)}} {{Simpleboxdata|label=上一季|data=[[海底小纵队动画(第五季)]]}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第七季)]]}} |} '''海底小纵队第一季'''(Octonauts Season 1)是[[海底小纵队(动画剧集)|海底小纵队系列]]的第一部作品。于2010年10月4日在英国CBeebies上首播(中文版于2014年5月13日在央视等平台首播)。第一季季包含50集11分钟的剧集,以及两集22分钟的特别篇。 This season debuts the Gup-A, Gup-B, Gup-C, Gup-D, and Gup-E, the five main Gups used primarily throughout the series. Also introduced is the Gup-F (The Speedy Sailfish), an unfinished prototype Gup, and the Gup-X (The Great Christmas Rescue), which is used frequently in following seasons. == Episodes == (待更新) [[分类:海底小纵队]][[分类:动画]][[分类:第一季]] bd49bfeeb0c75d4852a8fbacd039e7ba1e9c0956 2017 2016 2023-07-16T12:53:32Z Richard Robin 2 修正错误 wikitext text/x-wiki {{需要翻译}} {{需要补充}} {{Simpleboxtop | title = [[File:OCTONAUTS.png|300px|center]] | toptext = <big>海底小纵队第一季</big><br>Octonauts Season 1 | image = OctonautsTV.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = }} {{Simpleboxdata|label=集数|data=52(包含两集特别篇)}} {{Simpleboxdata|label=首播|data=2010年10月4日(英文版)<br>2014年5月13日(中文版)}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第二季)]]}} |} '''海底小纵队第一季'''(Octonauts Season 1)是[[海底小纵队(动画剧集)|海底小纵队系列]]的第一部作品。于2010年10月4日在英国CBeebies上首播(中文版于2014年5月13日在央视等平台首播)。第一季季包含50集11分钟的剧集,以及两集22分钟的特别篇。 This season debuts the Gup-A, Gup-B, Gup-C, Gup-D, and Gup-E, the five main Gups used primarily throughout the series. Also introduced is the Gup-F (The Speedy Sailfish), an unfinished prototype Gup, and the Gup-X (The Great Christmas Rescue), which is used frequently in following seasons. == Episodes == (待更新) [[分类:海底小纵队]][[分类:动画]][[分类:第一季]] ce489ed0f7bd91563ea57b394ec30152700aac24 2033 2017 2023-07-18T18:06:00Z Richard Robin 2 wikitext text/x-wiki {{需要翻译}} {{需要补充}} {{Simpleboxtop | title = [[File:OCTONAUTS.png|300px|center]] | toptext = <big>海底小纵队第一季</big><br>Octonauts Season 1 | image = OctonautsTV.jpg | imgwidth = 300px | width = 250px | bgcolor = #3ab8f3 | subtitle = }} {{Simpleboxdata|label=集数|data=52(包含两集特别篇)}} {{Simpleboxdata|label=首播|data=2010年10月4日(英文版)<br>2014年5月13日(中文版)}} {{Simpleboxdata|label=下一季|data=[[海底小纵队动画(第二季)]]}} |} '''海底小纵队第一季'''(Octonauts Season 1)是[[海底小纵队(动画剧集)|海底小纵队系列]]的第一部作品。于2010年10月4日在英国CBeebies上首播(中文版于2014年5月13日在央视等平台首播)。第一季季包含50集11分钟的剧集,以及两集22分钟的特别篇。 This season debuts the Gup-A, Gup-B, Gup-C, Gup-D, and Gup-E, the five main Gups used primarily throughout the series. Also introduced is the Gup-F (The Speedy Sailfish), an unfinished prototype Gup, and the Gup-X (The Great Christmas Rescue), which is used frequently in following seasons. == Episodes == (待更新) {{海底小纵队动画总览}} [[分类:海底小纵队]][[分类:动画]][[分类:第一季]] bbbd39459a1b9251f4dad1e5989721f891b1b71d 皮医生 0 46 2018 2002 2023-07-18T16:39:17Z 36.5.76.238 0 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>皮医生</big><br>Peso | image = PesoPenguin.png | width = 320px | bgcolor = #ACDFFF | subtitle = }} {{Simpleboxdata|label=性别|data=男}} {{Simpleboxdata|label=物种|data=企鹅}} {{Simpleboxdata|label=颜色|data=白色和黑色}} {{Simpleboxdata|label=职业|data=医生}} {{Simpleboxdata|label=居住地|data=[[章鱼堡]]}} {{Simpleboxdata|label=最喜欢的舰艇|data=[[孔雀鱼艇]]}} {{Simpleboxdata|label=最喜欢做的事|data=敲木琴、治疗(<del>绷带包扎包治百病</del>)}} {{Simpleboxdata|label=兄弟姐妹|data=[[宾托]](弟弟)、[[皮果]]<ref>特别篇中文名也叫“果果”</ref>(哥哥}} {{Simpleboxdata|label=毕业学校|data=某医学院<ref>剧集中皮医生有提过自己在医学院读书的经历,但没有提过具体是哪一所医学院。</ref>}} {{Simpleboxdata|label=其他亲戚|data=近亲:皮娜塔、皮蒂塔、皮皮、皮皮塔、皮踢踏……<ref>参考[[海底小纵队与水滴鱼兄弟]]这一集。</ref><br>表亲:阿德利企鹅、帝企鹅等}} {{Simpleboxdata|label=初次露面|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>[[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=(待补充)}} {{Simpleboxdata|label=配音演员|data=Paul Panting(英国版)<br>Wayne Grayson(美国版)}} |} 皮医生(Peso)名叫皮索,是一只可爱的企鹅,他是小队的医生,来自一个很大的企鹅家庭。他是小队中最年轻的成员。也常常把呱唧的吹牛皮当真。他不太喜欢吓人的情境(比如恐怖的船、黑漆漆的山洞),但是如果有人受伤或陷入麻烦,他会是小队中最勇敢的那个。宽广的心胸使他赢得了所有人的支持,无论是可怕的大型海洋动物还是小小的浮游生物。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:男 *物种:企鹅 *年龄:约18岁左右 *职务:医生 *别称:皮医生、小皮、皮皮 *关系:巴克队长(队长、信赖)、呱唧(同事)、宾托(弟弟) == 介绍 == 他是小队的医生,来自一个很大的企鹅家庭。他是小队中最年轻的成员。也常常把呱唧讲的传说当真。他不太喜欢吓人的情境(比如恐怖的船、黑漆漆的山洞),但是如果有人受伤或陷入麻烦,他会是小队中最勇敢的那个。宽广的心胸使他赢得了所有人的支持,无论是可怕的大型海洋动物还是小小的浮游生物。 他的勇气来自于一颗关爱别人的心。不过大家别被他暂且蹒跚的步态蒙骗了,当需要包扎时候,他的鳍会开足马力全速前进,他擅长包包裹、缠绷带、打结、解结,每次做这些事都会说:“嘿、嚓、呼、呀”可以在一秒内做好这些事。总之不管什么病都只需要缠绷带就可以治好。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:企鹅]] 15811830550d3e60d503b13e76869b0299588702 User talk:36.5.76.238 3 1018 2019 2023-07-18T16:39:19Z HAWelcome 0 欢迎新贡献者 wikitext text/x-wiki 您好,欢迎来到海底小纵队维基!感谢您编辑[[:皮医生]]页面。 '''[[Special:UserLogin|请登录并创建用户名]]'''。这是对您的贡献保持追踪的最佳方式,并帮助您与社群其他成员沟通。 请在[[User talk:Richard Robin|我的讨论页]]留下消息,只要我能帮助您什么就好!-- [[User:Richard Robin|Richard Robin]]([[User talk:Richard Robin|留言]]) 2023年7月18日 (二) 16:39 4f89d09faae0f3d7d45e657db0c4ae581a856532 谢灵通 0 48 2020 66 2023-07-18T16:56:56Z Richard Robin 2 资料卡 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>谢灵通</big><br>Dr. Shellington Sea Otter | image = Shellington .png | width = 300px | bgcolor = #deb44f | subtitle = }} {{Simpleboxdata|label=性别|data=男}} {{Simpleboxdata|label=物种|data=海獭}} {{Simpleboxdata|label=颜色|data=棕色(毛发)}} {{Simpleboxdata|label=职业|data=科学家/生物学家}} {{Simpleboxdata|label=兄弟姐妹|data=[[珍珠]]}} {{Simpleboxdata|label=侄子|data=[[派里克]]}} {{Simpleboxdata|label=最喜欢的舰艇|data=[[蓝鲸艇]]}} {{Simpleboxdata|label=初次露面|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>[[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=[[海底小纵队动画(第八季)]]}} {{Simpleboxdata|label=配音演员|data=Keith Wickham}} |} 谢灵通(Shellington)是一只海獭,可他却害怕海胆。(因为他对海胆过敏)他不擅长驾驶舰艇(蓝鲸艇除外,他曾经开坏过2-3个舰艇)以及其他交通工具且遇到大事时会手忙脚乱,在第一季第十集《海底小纵队与桨足动物》中,他把魔鬼鱼艇给开坏了;在灯塔水母那集,他又把喷射背包给弄坏了。谢灵通还有轻微的恐高哦。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:男 *物种:海獭 *年龄:约20多岁 *职务:生物学家 *关系:巴克队长(队长)、珍珠(姐姐)、派里克(外甥) == 介绍 == 总是透过他的放大镜观察生物。他博学多识,无所不知,常常能发现队友们所忽略的动人细节。谢灵通很容易被周围的环境分心物所吸引。 谢灵通是一只海獭,可他却害怕海胆(因为他对海胆过敏)。海底交通事故肇事逃逸者,他不擅长驾驶舰艇(蓝鲸艇除外,他曾经开坏过2-3个舰艇)以及其他交通工具且遇到大事时会手忙脚乱,在《桨足动物》那一集中,他把魔鬼鱼艇给开坏了;在《灯塔水母》那集,他又把喷射背包给弄坏了。谢灵通还有轻微的恐高。在英语版里的口头禅是 “Jumping jellyfish!”和“Fascinating!”。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:海獭]] 9a103f271df87df3a14baa2b68c151ee2be72404 突突兔 0 55 2021 74 2023-07-18T17:03:11Z Richard Robin 2 资料卡 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>突突兔</big><br>Tweak | image = TweakBunny .png | width = 300px | bgcolor = #daeec6 | subtitle = }} {{Simpleboxdata|label=性别|data=女}} {{Simpleboxdata|label=物种|data=沼泽兔}} {{Simpleboxdata|label=颜色|data=薄荷绿}} {{Simpleboxdata|label=职业|data=工程师}} {{Simpleboxdata|label=家人|data=[[沼泽游侠]](父亲)}} {{Simpleboxdata|label=最喜欢的舰艇|data=很多}} {{Simpleboxdata|label=初次露面|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>[[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=[[海底小纵队动画(第八季)]]}} {{Simpleboxdata|label=配音演员|data=Jo Wyatt、Jaimie Kelton}} |} 突突兔(Tweak)是小队的机械工程师,负责保养小队从灯笼鱼艇到魔鬼鱼艇的所有交通工具。她喜欢为某项特殊的任务改造机械,并且喜欢制作那些以意想不到的方式工作的新奇发明。她喜欢吃胡萝卜,为大家研究了很多发明,也带来了不少麻烦。她总是为她的新发明感到骄傲。“快到你来不及说完拔呀拔呀拔萝卜”是她的口头禅。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:女 *物种:兔子 *年龄:约20多岁 *职务:工程师 *别称:大姐姐 *关系:巴克队长(队长)、呱唧(同事)、达西西(同事)、沼泽游侠(父亲) == 介绍 == 突突兔是小队的机械工程师,负责保养小队从灯笼鱼艇到魔鬼鱼艇的所有交通工具。她喜欢为某项特殊的任务改造机械,并且喜欢制作那些以意想不到的方式工作的新奇发明。她喜欢吃胡萝卜,为大家研究了很多发明,也带来了不少麻烦。她总是为她的新发明感到骄傲。“快到你来不及说完拔呀拔呀拔萝卜”(英文版是:“faster than you can say ‘buncha munchy crunchy carrots’!”)是她的口头禅。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:兔]] 055cdda238bacb3b2d049d535339db7ee9d6e4bf 达西西 0 51 2022 70 2023-07-18T17:08:47Z Richard Robin 2 资料卡 wikitext text/x-wiki {{Simpleboxtop | title = | toptext = <big>达西西</big><br>Dashi | image = DashiDog.png | width = 320px | bgcolor = #fbbebc | subtitle = }} {{Simpleboxdata|label=性别|data=女}} {{Simpleboxdata|label=物种|data=腊肠狗}} {{Simpleboxdata|label=颜色|data=棕色}} {{Simpleboxdata|label=职业|data=摄影师}} {{Simpleboxdata|label=妹妹|data=[[卡西西]]}} {{Simpleboxdata|label=最喜欢的舰艇|data=Octoray}} {{Simpleboxdata|label=初次露面|data=[[海底小纵队与鲸鲨|鲸鲨]](英文版)<br>[[海底小纵队与海底风暴|海底风暴]](中文版)}} {{Simpleboxdata|label=最近露面|data=[[海底小纵队动画(第八季)]]}} {{Simpleboxdata|label=配音演员|data=Teresa Gallagher(英国版)<br>Mary Murphy (美国版第1-4季)<br>Jenny Yokobori (美国版目前配音)}} |} 达西西(Dashi)是一条腊肠狗,她喜欢冲浪,也是探险小队的官方摄影师,操控着整个团队的科技装备和通讯装置,是监管章鱼堡操作系统的电脑专家。她拍摄到的影像是小队收集到的数据中必不可少的一部分,并且归入了章鱼堡电脑系统的档案中。除了监控船只交通,在船只运输、追踪天气情况和制作数字表格方面,她还是巴克队长的左膀右臂。<ref>{{cite web | title = 万达宝贝王 - 中文网站 | url = https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | date = 2022-09-24 | archiveurl = http://archive.today/90X2O | archivedate = 2022-09-24 }}</ref> == 资料 == *性别:女 *物种:腊肠狗 *年龄:约20多岁 *职务:电脑程序员、摄影师 *别称:达西 *关系:巴克队长(队长、信任)、突突兔(同事)、卡西西(妹妹) == 介绍 == 海底小纵队官方摄影师。喜欢冲浪,操控着整个团队的科技装备和通讯装置,是监管章鱼堡操作系统的电脑专家。她拍摄到的影像是小队收集到的数据中必不可少的一部分,并且归入了章鱼堡电脑系统的档案中。除了监控船只交通,在船只运输、追踪天气情况和制作数字表格方面,她还是巴克队长的左膀右臂。 ​[[分类:人物]]​[[分类:海底小纵队成员]]​[[分类:狗]] 7efeeb45db445d0ad9b58e21bf0bb7c134210c58 Template:需要翻译 10 931 2023 1959 2023-07-18T17:09:59Z Richard Robin 2 wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid #2971ff;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:Profinkling.png|100px|center|link=[[章教授]]]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>这个页面的内容需要翻译。</big></big>'''<br> <div style="margin-top:0.5em;">我们非常欢迎各位有能力的朋友协助我们翻译这些页面,但也请各位量力而行,不要使用机翻导致翻译出来的东西无法理解。请使用本土化的语言(尤其是在中文版已经出现的专有名词)。</div> </td> </tr> </table> da5a8b7a767a81328b03f143995e5dd5e0d7f044 2050 2023 2023-07-19T03:37:24Z Richard Robin 2 已保护“[[Template:需要翻译]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid #2971ff;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:Profinkling.png|100px|center|link=[[章教授]]]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>这个页面的内容需要翻译。</big></big>'''<br> <div style="margin-top:0.5em;">我们非常欢迎各位有能力的朋友协助我们翻译这些页面,但也请各位量力而行,不要使用机翻导致翻译出来的东西无法理解。请使用本土化的语言(尤其是在中文版已经出现的专有名词)。</div> </td> </tr> </table> da5a8b7a767a81328b03f143995e5dd5e0d7f044 Template:需要补充 10 991 2024 1977 2023-07-18T17:10:35Z Richard Robin 2 wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid #FFBB77;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:Kwazii2.jpg|100px|center|link=[[呱唧]]]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>我的老天爷啊!内容也太少了吧!</big></big>'''<br> <div style="margin-top:0.5em;">本页面内容过少,还需要继续补充完整,欢迎大家对本页的内容进行编写。但请遵守海底小纵队维基的编辑规范,不要编造无中生有的内容。</div> </td> </tr> </table> 228836e11a6c5ea4c63a824a3e442bc54b04b4fb 2052 2024 2023-07-19T03:37:40Z Richard Robin 2 已保护“[[Template:需要补充]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid #FFBB77;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:Kwazii2.jpg|100px|center|link=[[呱唧]]]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>我的老天爷啊!内容也太少了吧!</big></big>'''<br> <div style="margin-top:0.5em;">本页面内容过少,还需要继续补充完整,欢迎大家对本页的内容进行编写。但请遵守海底小纵队维基的编辑规范,不要编造无中生有的内容。</div> </td> </tr> </table> 228836e11a6c5ea4c63a824a3e442bc54b04b4fb Template:现实人物 10 996 2025 1983 2023-07-18T17:11:33Z Richard Robin 2 wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid gray;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:人物头像.png|80px|center|link=]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>这是一个关于介绍现实中存在的人物的页面。</big></big>'''<br> <div style="margin-top:0.5em;">请不要编写有侵犯他人版权、攻击性、诽谤中伤他人或他人隐私的内容,违者可能会导致文章被删除甚至您的账号会被封禁,若编辑了不良的内容导致被当事人提告本站概不负责,一切后果由编辑者自行承担。</div> </td> </tr> </table> faaa0f918db66f32e66b1b48d01a8acd81d70b82 2051 2025 2023-07-19T03:37:32Z Richard Robin 2 已保护“[[Template:现实人物]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px solid #acc8ff; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid gray;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:人物头像.png|80px|center|link=]]</td> <td style="padding: 0.5em 0.8em;">'''<big><big>这是一个关于介绍现实中存在的人物的页面。</big></big>'''<br> <div style="margin-top:0.5em;">请不要编写有侵犯他人版权、攻击性、诽谤中伤他人或他人隐私的内容,违者可能会导致文章被删除甚至您的账号会被封禁,若编辑了不良的内容导致被当事人提告本站概不负责,一切后果由编辑者自行承担。</div> </td> </tr> </table> faaa0f918db66f32e66b1b48d01a8acd81d70b82 海底小纵队(消歧义) 0 6 2026 163 2023-07-18T17:22:51Z Richard Robin 2 Richard Robin移动页面[[海底小纵队]]至[[海底小纵队(消歧义)]]:​建立消歧义界面(一般来说“海底小纵队”可以指绘本、动漫、电影、作品中组成的团体等,所以如果用户需要搜索“海底小纵队”,可以使用这个消歧义页让用户自行选择自己需要的信息。但我们会保留此页作为重定向。 wikitext text/x-wiki [[文件:OCTONAUTS.png|300px|居中]] 海底小纵队(Octonauts),可被解释为多篇文章: *如果你正在寻找由[[巴克队长]]为领导组成的团队,请进入[[海底小纵队(团队)]]。 *如果您在寻找《海底小纵队》绘本图书的介绍,请进入[[海底小纵队(原作绘本)]]。 *如果您在寻找《海底小纵队》动画剧集的介绍,请进入[[海底小纵队(动画剧集)]]。 **如果您在寻找《海底小纵队》动画剧集第一部的介绍,请进入[[海底小纵队动画(第一季)]]。 **如果您在寻找《海底小纵队》动画剧集第二部的介绍,请进入[[海底小纵队动画(第二季)]]。 **如果您在寻找《海底小纵队》动画剧集第三部的介绍,请进入[[海底小纵队动画(第三季)]]。 **如果您在寻找《海底小纵队》动画剧集第四部的介绍,请进入[[海底小纵队动画(第四季)]]。 **如果您在寻找《海底小纵队》动画剧集第五部的介绍,请进入[[海底小纵队动画(第五季)]]。 **如果您在寻找《海底小纵队》动画剧集第六部的介绍,请进入[[海底小纵队动画(第六季)]]。 **如果您在寻找《海底小纵队》动画剧集第七部的介绍,请进入[[海底小纵队动画(第七季)]]。 **如果您在寻找《海底小纵队》动画剧集第八部的介绍,请进入[[海底小纵队动画(第八季)]]。 *如果您在寻找已于2021年在中国上映的电影的介绍,请进入[[海底小纵队大电影1:火焰之环]]。 *如果您在寻找已于2022年在中国上映的电影的介绍,请进入[[海底小纵队大电影2:洞穴大冒险]]。 7a7141015f7439c3423d8f62da1e7e5624a0719a 海底小纵队 0 1019 2027 2023-07-18T17:22:51Z Richard Robin 2 Richard Robin移动页面[[海底小纵队]]至[[海底小纵队(消歧义)]]:​建立消歧义界面(一般来说“海底小纵队”可以指绘本、动漫、电影、作品中组成的团体等,所以如果用户需要搜索“海底小纵队”,可以使用这个消歧义页让用户自行选择自己需要的信息。但我们会保留此页作为重定向。 wikitext text/x-wiki #REDIRECT [[海底小纵队(消歧义)]] 4113a8ce9d9f583608696be3c5e57743e8a5560d Template:Navbox with collapsible groups 10 1020 2028 2023-07-18T17:39:35Z Richard Robin 2 创建页面,内容为“{{Navbox |class={{{class|}}} |name = {{{name|<noinclude>Navbox with collapsible groups</noinclude>}}} |navbar = {{{navbar|}}} |state = {{{state|<noinclude>mw-uncollapsed</noinclude>}}} |border = {{{border|{{{1|}}}}}} |title = {{{title<includeonly>|</includeonly>}}} |above = {{{above|}}} |below = {{{below|}}} |image = {{{image|}}} |imageleft = {{{imageleft|}}} |style = {{{style|}}};{{{bodystyle|}}} |basestyle = {{{basestyle|}}} |innerstyle = {{{innerstyle|}}}…” wikitext text/x-wiki {{Navbox |class={{{class|}}} |name = {{{name|<noinclude>Navbox with collapsible groups</noinclude>}}} |navbar = {{{navbar|}}} |state = {{{state|<noinclude>mw-uncollapsed</noinclude>}}} |border = {{{border|{{{1|}}}}}} |title = {{{title<includeonly>|</includeonly>}}} |above = {{{above|}}} |below = {{{below|}}} |image = {{{image|}}} |imageleft = {{{imageleft|}}} |style = {{{style|}}};{{{bodystyle|}}} |basestyle = {{{basestyle|}}} |innerstyle = {{{innerstyle|}}} |titlestyle = {{{titlestyle|}}} |abovestyle = {{{abovestyle|}}} |belowstyle = {{{belowstyle|}}} |imagestyle = {{{imagestyle|}}} |imageleftstyle = {{{imageleftstyle|}}} |list1 = {{#if:{{{group1<includeonly>|</includeonly>}}}{{{sect1|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr1}}} |mw-uncollapsed |{{{state1|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect1style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group1style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group1<includeonly>|</includeonly>}}}{{{sect1|}}} |list1 = {{{list1<includeonly>|</includeonly>}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list1|}}} }} |list2 = {{#if:{{{group2<includeonly>|</includeonly>}}}{{{sect2|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr2}}} |mw-uncollapsed |{{{state2|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect2style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group2style|}}} |liststyle = {{{liststyle|}}};{{{list2style|}}} |title = {{{group2<includeonly>|</includeonly>}}}{{{sect2|}}} |list1 = {{{list2<includeonly>|</includeonly>}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list2|}}} }} |list3 = {{#if:{{{group3<includeonly>|</includeonly>}}}{{{sect3|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr3}}} |mw-uncollapsed |{{{state3|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect3style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group3style|}}} |liststyle = {{{liststyle|}}};{{{list3style|}}} |title = {{{group3<includeonly>|</includeonly>}}}{{{sect3|}}} |list1 = {{{list3<includeonly>|</includeonly>}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list3|}}} }} |list4 = {{#if:{{{group4<includeonly>|</includeonly>}}}{{{sect4|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr4}}} |mw-uncollapsed |{{{state4|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect4style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group4style|}}} |liststyle = {{{liststyle|}}};{{{list4style|}}} |title = {{{group4<includeonly>|</includeonly>}}}{{{sect4|}}} |list1 = {{{list4<includeonly>|</includeonly>}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list4|}}} }} |list5 = {{#if:{{{group5|}}}{{{sect5|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr5}}} |mw-uncollapsed |{{{state5|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect5style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group5style|}}} |liststyle = {{{liststyle|}}};{{{list5style|}}} |title = {{{group5|}}}{{{sect5|}}} |list1 = {{{list5|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list5|}}} }} |list6 = {{#if:{{{group6|}}}{{{sect6|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr6}}} |mw-uncollapsed |{{{state6|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect6style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group6style|}}} |liststyle = {{{liststyle|}}};{{{list6style|}}} |title = {{{group6|}}}{{{sect6|}}} |list1 = {{{list6|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list6|}}} }} |list7 = {{#if:{{{group7|}}}{{{sect7|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr7}}} |mw-uncollapsed |{{{state7|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect7style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group7style|}}} |liststyle = {{{liststyle|}}};{{{list7style|}}} |title = {{{group7|}}}{{{sect7|}}} |list1 = {{{list7|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list7|}}} }} |list8 = {{#if:{{{group8|}}}{{{sect8|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr8}}} |mw-uncollapsed |{{{state8|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect8style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group8style|}}} |liststyle = {{{liststyle|}}};{{{list8style|}}} |title = {{{group8|}}}{{{sect8|}}} |list1 = {{{list8|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list8|}}} }} |list9 = {{#if:{{{group9|}}}{{{sect9|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr9}}} |mw-uncollapsed |{{{state9|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect9style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group9style|}}} |liststyle = {{{liststyle|}}};{{{list9style|}}} |title = {{{group9|}}}{{{sect9|}}} |list1 = {{{list9|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list9|}}} }} |list10 = {{#if:{{{group10|}}}{{{sect10|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr10}}} |mw-uncollapsed |{{{state10|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect10style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group10style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group10|}}}{{{sect10|}}} |list1 = {{{list10|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list10|}}} }} |list11 = {{#if:{{{group11|}}}{{{sect11|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr11}}} |mw-uncollapsed |{{{state11|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect11style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group11style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group11|}}}{{{sect11|}}} |list1 = {{{list11|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list11|}}} }} |list12 = {{#if:{{{group12|}}}{{{sect12|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr12}}} |mw-uncollapsed |{{{state12|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect12style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group12style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group12|}}}{{{sect12|}}} |list1 = {{{list12|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list12|}}} }} |list13 = {{#if:{{{group13|}}}{{{sect13|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr13}}} |mw-uncollapsed |{{{state13|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect13style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group13style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group13|}}}{{{sect13|}}} |list1 = {{{list13|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list13|}}} }} |list14 = {{#if:{{{group14|}}}{{{sect14|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr14}}} |mw-uncollapsed |{{{state14|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect14style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group14style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group14|}}}{{{sect14|}}} |list1 = {{{list14|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list14|}}} }} |list15 = {{#if:{{{group15|}}}{{{sect15|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr15}}} |mw-uncollapsed |{{{state15|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect15style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group15style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group15|}}}{{{sect15|}}} |list1 = {{{list15|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list15|}}} }} |list16 = {{#if:{{{group16|}}}{{{sect16|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr16}}} |mw-uncollapsed |{{{state16|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect16style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group16style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group16|}}}{{{sect16|}}} |list1 = {{{list16|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list16|}}} }} |list17 = {{#if:{{{group17|}}}{{{sect17|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr17}}} |mw-uncollapsed |{{{state17|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect17style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group17style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group17|}}}{{{sect17|}}} |list1 = {{{list17|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list17|}}} }} |list18 = {{#if:{{{group18|}}}{{{sect18|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr18}}} |mw-uncollapsed |{{{state18|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect18style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group18style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group18|}}}{{{sect18|}}} |list1 = {{{list18|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list18|}}} }} |list19 = {{#if:{{{group19|}}}{{{sect19|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr19}}} |mw-uncollapsed |{{{state19|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect19style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group19style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group19|}}}{{{sect19|}}} |list1 = {{{list19|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list19|}}} }} |list20 = {{#if:{{{group20|}}}{{{sect20|}}} | {{Navbox|child |state = {{#ifeq:{{{selected}}}|{{{abbr20}}} |mw-uncollapsed |{{{state20|mw-collapsed}}}}} |style = {{{sectstyle|}}};{{{sect20style|}}} |titlestyle = {{{basestyle|}}};{{{groupstyle|}}};{{{secttitlestyle|}}};{{{group20style|}}} |liststyle = {{{liststyle|}}};{{{list1style|}}} |title = {{{group20|}}}{{{sect20|}}} |list1 = {{{list20|}}} |{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}} }} | {{{list20|}}} }} }}<noinclude><!-- 本行下加入模板的分類 --> {{documentation}} [[Category:格式模板]][[Category:导航模板]] f3a49cf0932e2b2656f815a157aba27cde9cafa3 Template:海底小纵队动画总览 10 1022 2030 2023-07-18T18:03:52Z Richard Robin 2 创建页面,内容为“{{Navbox with collapsible groups |name = 海底小纵队动画总览 |title = [[海底小纵队(动画剧集)|海底小纵队]]动画总览 |group1 = 连续剧集 |abbr1 = 连续剧集 |list1 = [[海底小纵队动画(第一季)|第一季]] • [[海底小纵队动画(第二季)|第二季]] • [[海底小纵队动画(第三季)|第三季]] • [[海底小纵队动画(第四季)|第四季]] • 海底小纵队动画(第五季)|第五…” wikitext text/x-wiki {{Navbox with collapsible groups |name = 海底小纵队动画总览 |title = [[海底小纵队(动画剧集)|海底小纵队]]动画总览 |group1 = 连续剧集 |abbr1 = 连续剧集 |list1 = [[海底小纵队动画(第一季)|第一季]] • [[海底小纵队动画(第二季)|第二季]] • [[海底小纵队动画(第三季)|第三季]] • [[海底小纵队动画(第四季)|第四季]] • [[海底小纵队动画(第五季)|第五季]] • [[海底小纵队动画(第六季)|第六季]] • [[海底小纵队动画(第七季)|第七季]] • [[海底小纵队动画(第八季)|第八季]] |group2 = 电影 |abbr1 = 电影 |list2 = [[海底小纵队动画(第一季)|第一季]] • [[海底小纵队动画(第二季)|第二季]] }} 7a705fc6796f602fb931ceadefa5e3bbd91b012f 2032 2030 2023-07-18T18:05:17Z Richard Robin 2 修订错误 wikitext text/x-wiki {{Navbox with collapsible groups |name = 海底小纵队动画总览 |title = [[海底小纵队(动画剧集)|海底小纵队]]动画总览 |group1 = 连续剧集 |abbr1 = 连续剧集 |list1 = [[海底小纵队动画(第一季)|第一季]] • [[海底小纵队动画(第二季)|第二季]] • [[海底小纵队动画(第三季)|第三季]] • [[海底小纵队动画(第四季)|第四季]] • [[海底小纵队动画(第五季)|第五季]] • [[海底小纵队动画(第六季)|第六季]] • [[海底小纵队动画(第七季)|第七季]] • [[海底小纵队动画(第八季)|第八季]] |group2 = 电影 |abbr1 = 电影 |list2 = [[海底小纵队大电影1:火焰之环|火焰之环]] • [[海底小纵队大电影2:洞穴大冒险|洞穴大冒险]] }} 1d5144084667ea01a897f6885b39266b60d4ccfb 2049 2032 2023-07-19T03:37:16Z Richard Robin 2 已保护“[[Template:海底小纵队动画总览]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki {{Navbox with collapsible groups |name = 海底小纵队动画总览 |title = [[海底小纵队(动画剧集)|海底小纵队]]动画总览 |group1 = 连续剧集 |abbr1 = 连续剧集 |list1 = [[海底小纵队动画(第一季)|第一季]] • [[海底小纵队动画(第二季)|第二季]] • [[海底小纵队动画(第三季)|第三季]] • [[海底小纵队动画(第四季)|第四季]] • [[海底小纵队动画(第五季)|第五季]] • [[海底小纵队动画(第六季)|第六季]] • [[海底小纵队动画(第七季)|第七季]] • [[海底小纵队动画(第八季)|第八季]] |group2 = 电影 |abbr1 = 电影 |list2 = [[海底小纵队大电影1:火焰之环|火焰之环]] • [[海底小纵队大电影2:洞穴大冒险|洞穴大冒险]] }} 1d5144084667ea01a897f6885b39266b60d4ccfb 海底小纵队维基:免责声明 4 8 2037 20 2023-07-19T03:34:04Z Richard Robin 2 已保护“[[海底小纵队维基:免责声明]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期))[连锁保护] wikitext text/x-wiki <div style="font-size: 2.5em; text-align: center; line-height: 100%; padding: 1em;">'''海底小纵队维基不保证内容的有效性和准确性。'''</div> 我们力求使海底小纵队维基成为专业、准确的在线百科全书。但作为开放的、协作共建的百科系统,任何人都可以向海底小纵队维基提交内容。我们会尽力对用户提交的内容进行检查,但海底小纵队维基的管理员、贡献者和任何相关人员不对站点上的任何内容承担任何责任。 如您在海底小纵队维基遇到任何不合适的或对您冒犯的内容,请联系[[Special:用户列表/sysop|管理员]],我们会在收到报告后短时间内移除相关内容。 除非特别说明,海底小纵队维基内文字内容基于 [https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 ==版权声明== '''OCTONAUTSTM OCTOPODTM Meomi Design Inc. OCTONAUTS Copyright © 2021 Vampire Squid Productions Limited. All rights reserved.''' '''Copyright © 2021 Silvergate Media Holdings Limited, registered in England and Wales under company number 08880268,. Registered VAT number 115149928. All rights reserved.''' 海底小纵队(Octonauts)相关的商标权和其它知识产权归原作者 Vicky Wong 和 Michael Murphy、英国Silvergate(银色大门)公司、加拿大Meomi工作室、中国万达宝贝王集团等企划单位或个人所有。海底小纵队维基与上述单位没有任何关联,相关权利不属于以上许可协议授权范围。 海底小纵队维基对《海底小纵队》内容的使用基于著作权法的合理使用原则,绝无侵犯著作权之故意。 [[Category:海底小纵队维基|{{PAGENAME}}]] dcad15f86f16f6b3628145175f2b0e4ad46c1513 海底小纵队维基:关于 4 11 2038 184 2023-07-19T03:34:17Z Richard Robin 2 已保护“[[海底小纵队维基:关于]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期))[连锁保护] wikitext text/x-wiki [[文件:海底小纵队维基LOGO.png|300px|居中]] 海底小纵队维基,基于Miraheze的意在收录海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素的网站。 该网站的部分内容可能会从[https://octonauts.fandom.com/wiki/Octonauts%20Wiki 海底小纵队英文维基] 或其他网站摘录、翻译,若摘录的内容侵犯到您的权益,您可以立刻联系我们并要求删除侵权内容。 本网站的原创内容默认基于[https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 3ecd674a461b3bb7260aadd2fad3da32d916c3ec 海底小纵队维基:动画工程 4 56 2039 79 2023-07-19T03:34:28Z Richard Robin 2 已保护“[[海底小纵队维基:动画工程]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki == 该工程收录范围 == 动画工程涵盖《海底小纵队》动画中的主系列剧集以及特别篇、电影等其他视频节目。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写从动画每一季的介绍,包括了登场人物、整季所有集数出现的生物以及信息框。 *编写动画中所有的集,包括了摘要、登场人物、该集介绍(出现)的生物以及信息框。 *编写每部在电影院或网络上映的大电影,包括了摘要、登场人物、该部电影出现的生物以及信息框。 *编写动画特别篇等其他视频页面。 == 该工程可能会经常使用到的模板 == (目前百科正在筹备中,相关模板待完善) [[分类:海底小纵队维基工程]] f695d0cf6d01dceb70320f567071c539e7b3201e 海底小纵队维基:图书工程 4 57 2040 80 2023-07-19T03:34:38Z Richard Robin 2 已保护“[[海底小纵队维基:图书工程]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki == 该工程收录范围 == 图书工程主要涵盖由Meomi工作室制作的《海底小纵队》原著绘本、《海底小纵队》动画片改编的周边图书等纸质传媒产品。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写《海底小纵队》原著绘本的页面。 *编写《海底小纵队》动画改编图书(包括绘本、漫画等)的页面。 == 该工程可能会经常使用到的模板 == (目前百科正在筹备中,相关模板待完善) [[分类:海底小纵队维基工程]] a314df9317e09ff6bc008c96a638606f2a166bb0 海底小纵队维基:版权 4 7 2041 130 2023-07-19T03:34:48Z Richard Robin 2 已保护“[[海底小纵队维基:版权]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki 海底小纵队维基的原创内容默认基于[https://creativecommons.org/licenses/by-sa/4.0/ 署名-相同方式共享 4.0 国际]许可协议。 <big>您可以自由地:</big> *'''共享''' — 在任何媒介以任何形式复制、发行本作品。 *'''演绎''' — 修改、转换或以本作品为基础进行创作,在任何用途下,甚至商业目的。 只要你遵守许可协议条款,许可人就无法收回你的这些权利。 <big>惟须遵守下列条件:</big> *'''署名''' — 您必须给出适当的署名,提供指向本许可协议的链接,同时标明是否(对原始作品)作了修改。您可以用任何合理的方式来署名,但是不得以任何方式暗示许可人为您或您的使用背书。 *'''相同方式共享''' — 如果您再混合、转换或者基于本作品进行创作,您必须基于'''与原先许可协议相同的许可协议'''分发您贡献的作品。 *'''没有附加限制''' — 您不得适用法律术语或者技术措施从而限制其他人做许可协议允许的事情。 <big>声明:</big> *您不必因为公共领域的作品要素而遵守许可协议,或者您的使用被可适用的例外或限制所允许。 *不提供担保。许可协议可能不会给与您意图使用的所必须的所有许可。例如,其他权利比如形象权、隐私权或人格权可能限制您如何使用作品。 == 免责声明 == '''OCTONAUTS™ OCTOPOD™ Meomi Design Inc. OCTONAUTS Copyright © 2021 Vampire Squid Productions Limited. All rights reserved.''' '''Copyright © 2021 Silvergate Media Holdings Limited, registered in England and Wales under company number 08880268,. Registered VAT number 115149928. All rights reserved.''' 海底小纵队(Octonauts)相关的商标权和其它知识产权归原作者 Vicky Wong 和 Michael Murphy、英国Silvergate(银色大门)公司、加拿大Meomi工作室、中国万达宝贝王集团等企划单位或个人所有。海底小纵队维基与上述单位没有任何关联,相关权利不属于以上许可协议授权范围。 海底小纵队维基对《海底小纵队》内容的使用基于著作权法的合理使用原则,绝无侵犯著作权之故意。 [[Category:海底小纵队维基规范]] b52d5e01bf0d6b7069de1fea357b92acaeaf4773 海底小纵队维基:生物工程 4 58 2042 81 2023-07-19T03:35:02Z Richard Robin 2 已保护“[[海底小纵队维基:生物工程]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki == 该工程收录范围 == 生物工程主要收录所有在《海底小纵队》动画片中介绍(登场)的现实生物。主要出场角色(如“[[巴克队长]]”、“[[呱唧]]”等)的物种也在工程的编写范围内。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写所有在《海底小纵队》动画片中出现(介绍)的现实中存在的生物。 == 编写要求 == *所有生物工程中收录的生物在信息栏都'''必须配上'''该生物在动画中的形象以及在现实中的照片。 *除特殊情况外,所有现实中的照片都需要在上传时选用“原作者保留权利(原作者没有明确的授权声明)”许可协议。 *引用其他文献时,请遵守引用文章的版权协议。 == 该工程可能会经常使用到的模板 == (目前百科正在筹备中,相关模板待完善) [[分类:海底小纵队维基工程]] 0315e8be09e03d3239091d6aade11e684cac2aac 海底小纵队维基:角色工程 4 60 2043 83 2023-07-19T03:35:13Z Richard Robin 2 已保护“[[海底小纵队维基:角色工程]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki == 该工程收录范围 == 角色工程主要收录的是《海底小纵队》动画、原著绘本中登场的角色。 该工程是海底小纵队维基的最主要工程之一。 == 目前工作 == *编写[[海底小纵队(团队)|海底小纵队]]中的所有主要成员与外派员等角色。包括他们的摘要、信息栏、详细介绍、画廊等内容。 *编写《海底小纵队》原著绘本中出现的角色。 *编写《海底小纵队》动画中出场(被介绍)的生物角色。 == 注意 == 请在编写该工程时注意不要和'''生物工程'''的工作混淆。 == 该工程可能会经常使用到的模板 == (目前百科正在筹备中,相关模板待完善) [[分类:海底小纵队维基工程]] dc72235e6eca2a5bede74891a8152daedfdf49df MediaWiki:Licenses 8 12 2044 24 2023-07-19T03:35:43Z Richard Robin 2 已保护“[[MediaWiki:Licenses]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki * 开放授权 ** PD|公有领域授权 ** Cc-by|知识共享 署名 4.0 协议 ** Cc-by-sa|知识共享 署名-相同方式共享 4.0 协议 ** Cc-by-nc-sa|知识共享 署名-非商业性使用-相同方式共享 4.0 协议 *CC协议 **CC Zero|CC-0(作者授权以无著作权方式使用) **CC BY|CC BY 3.0 (作者授权以署名方式使用,该授权需兼容3.0协议) **CC BY-SA|CC BY-SA 3.0 (作者授权以署名-相同方式共享使用,该授权需兼容3.0协议) **CC BY-NC-SA|CC BY-NC-SA 3.0(作者授权以署名-非商业使用-相同方式共享使用,该授权需兼容3.0协议) *公有领域 **PD-Old|作者离世一定年限后流入公有领域 **PD-Other|其他原因流入公有领域 * 其他 **Copyright|原作者保留权利(原作者没有明确的授权声明) **Authorized|原作者授权本网站使用 **可自由使用|可自由使用(作者放弃版权或声明可自由使用) **海底小纵队维基版权所有|海底小纵队维基版权所有 5ae1485e39dc27cb0626365e590d1c3fdcd73148 MediaWiki:Sidebar 8 110 2045 187 2023-07-19T03:36:00Z Richard Robin 2 已保护“[[MediaWiki:Sidebar]]”([编辑=仅允许自动确认用户](无限期)[移动=仅允许自动确认用户](无限期)) wikitext text/x-wiki * navigation ** mainpage|mainpage-description ** recentchanges-url|recentchanges ** randompage-url|randompage ** 海底小纵队维基:沙盒|沙盒 ** helppage|help-mediawiki * SEARCH * 相关链接 ** https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | 中文官网 ** https://www.theoctonauts.com | 英文官网 ** https://tieba.baidu.com/海底小纵队 | 贴吧 ** https://weibo.com/u/5184055512 | 微博 ** https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index | 超话 ** https://space.bilibili.com/1057641912 | 哔哩哔哩 ** https://twitter.com/Octonauts | 推特 ** https://www.facebook.com/octonauts | 脸书 ** https://www.youtube.com/c/Octonauts | YouTube * TOOLBOX * LANGUAGES 567bfc992fa0c5d344aa8208bd201868110bfbc2 2046 2045 2023-07-19T03:36:16Z Richard Robin 2 已更改“[[MediaWiki:Sidebar]]”的保护设置([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki * navigation ** mainpage|mainpage-description ** recentchanges-url|recentchanges ** randompage-url|randompage ** 海底小纵队维基:沙盒|沙盒 ** helppage|help-mediawiki * SEARCH * 相关链接 ** https://www.kidsplace.cn/ip-introduce/index.aspx?nodeid=1196 | 中文官网 ** https://www.theoctonauts.com | 英文官网 ** https://tieba.baidu.com/海底小纵队 | 贴吧 ** https://weibo.com/u/5184055512 | 微博 ** https://weibo.com/p/100808c84293c054ac1050719d4cc6a9f77947/super_index | 超话 ** https://space.bilibili.com/1057641912 | 哔哩哔哩 ** https://twitter.com/Octonauts | 推特 ** https://www.facebook.com/octonauts | 脸书 ** https://www.youtube.com/c/Octonauts | YouTube * TOOLBOX * LANGUAGES 567bfc992fa0c5d344aa8208bd201868110bfbc2 Template:Navbox 10 79 2047 1670 2023-07-19T03:36:57Z Richard Robin 2 已保护“[[Template:Navbox]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期))[连锁保护] wikitext text/x-wiki <includeonly><!-- 请不要擅自在讨论前更改本模板的任何内容。本模板应用广泛,错误设置易导致全站崩溃。 -->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table class="navbox {{{class|}}}" cellspacing="0" style="{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">}}<!-- --><table cellspacing="0" class="nowraplinks {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|#default=mw-collapsible {{#if:{{{state|}}}|{{{state}}}|autocollapse}}}}}} {{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=navbox-subgroup" style="display:table;width:100%;{{{bodystyle|}}};{{{style|}}}|#default=" style="display:table;width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};"><!-- ---Title and Navbar--- -->{{#if:{{{title|}}}|<tr>{{#if:{{{titlegroup|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}"><!-- -->{{{titlegroup|}}}</td><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!-- -->colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} <!-- -->class="navbox-title"><!-- -->{{#if:{{#switch:{{{navbar|}}}|plain|off=1}}<!-- -->{{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}|<!-- -->{{#ifeq:{{{navbar|}}}|off|{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:2.78em;">&nbsp;</div>}}|<!-- -->{{#ifeq:{{{state|}}}|plain||<div style="float:left; width:2.78em;text-align:left;">&nbsp;</div>}}}}|<!-- --><div style="float:left; width:2.78em;text-align:left;"><span class="mobileonly">&nbsp;</span><!-- -->{{Navbar|{{{name}}}|fontstyle={{{basestyle|}}};{{{titlestyle|}}};border:none;|mini=1}}<!-- --></div>{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:2.78em;">&nbsp;</div>}}}}<!-- --><span style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"><!-- -->{{{title}}}</span></th></tr>}}<!-- ---Above--- -->{{#if:{{{above|}}}|<!-- -->{{#if:{{{title|}}}|<tr style="height:2px;"><td></td></tr>}}<!-- --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" <!-- -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{above}}}</td></tr>}}<!-- ---Body--- ---First group/list and images--- -->{{#if:{{{list1|}}}|{{#if:{{{title|}}}{{{above|}}}|<tr style="height:2px;"><td></td></tr>}}<tr><!-- -->{{#if:{{{imageleft|}}}|<!-- --><td style="width:0%;padding:0px 2px 0px 0px;{{{imageleftstyle|}}}" <!-- -->rowspan={{#expr:1{{#if:{{{list2|}}}|+2}}{{#if:{{{list3|}}}|+2}}{{#if:{{{list4|}}}|+2}}<!-- -->{{#if:{{{list5|}}}|+2}}{{#if:{{{list6|}}}|+2}}{{#if:{{{list7|}}}|+2}}{{#if:{{{list8|}}}|+2}}<!-- -->{{#if:{{{list9|}}}|+2}}{{#if:{{{list10|}}}|+2}}{{#if:{{{list11|}}}|+2}}{{#if:{{{list12|}}}|+2}}<!-- -->{{#if:{{{list13|}}}|+2}}{{#if:{{{list14|}}}|+2}}{{#if:{{{list15|}}}|+2}}{{#if:{{{list16|}}}|+2}}<!-- -->{{#if:{{{list17|}}}|+2}}{{#if:{{{list18|}}}|+2}}{{#if:{{{list19|}}}|+2}}{{#if:{{{list20|}}}|+2}}<!-- -->{{#if:{{{list21|}}}|+2}}{{#if:{{{list22|}}}|+2}}}}><!-- -->{{{imageleft|}}}</td>}}<!-- -->{{#if:{{{group1|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group1style|}}}"><!-- -->{{{group1}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list1style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{list1padding|{{{listpadding|0 0.25em}}}}}}">{{{list1}}}</div></td><!-- -->{{#if:{{{image|}}}|<!-- --><td style="width:0%;padding:0px 0px 0px 2px;{{{imagestyle|}}}" <!-- -->rowspan={{#expr:1{{#if:{{{list2|}}}|+2}}{{#if:{{{list3|}}}|+2}}{{#if:{{{list4|}}}|+2}}<!-- -->{{#if:{{{list5|}}}|+2}}{{#if:{{{list6|}}}|+2}}{{#if:{{{list7|}}}|+2}}{{#if:{{{list8|}}}|+2}}<!-- -->{{#if:{{{list9|}}}|+2}}{{#if:{{{list10|}}}|+2}}{{#if:{{{list11|}}}|+2}}{{#if:{{{list12|}}}|+2}}<!-- -->{{#if:{{{list13|}}}|+2}}{{#if:{{{list14|}}}|+2}}{{#if:{{{list15|}}}|+2}}{{#if:{{{list16|}}}|+2}}<!-- -->{{#if:{{{list17|}}}|+2}}{{#if:{{{list18|}}}|+2}}{{#if:{{{list19|}}}|+2}}{{#if:{{{list20|}}}|+2}}<!-- -->{{#if:{{{list21|}}}|+2}}{{#if:{{{list22|}}}|+2}}}}><!-- -->{{{image|}}}</td>}}<!-- --></tr>}}<!-- ---Remaining groups/lists--- -->{{#if:{{{list2|}}}|<!-- -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- -->{{#if:{{{group2|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group2style|}}}"><!-- -->{{{group2}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list2style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list2}}}</div></td></tr>}}<!-- -->{{#if:{{{list3|}}}|<!-- -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- -->{{#if:{{{group3|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group3style|}}}"><!-- -->{{{group3}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list3style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list3}}}</div></td></tr>}}<!-- -->{{#if:{{{list4|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group4|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group4style|}}}"><!-- -->{{{group4}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list4style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list4}}}</div></td></tr>}}<!-- -->{{#if:{{{list5|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group5|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group5style|}}}"><!-- -->{{{group5}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list5style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list5}}}</div></td></tr>}}<!-- -->{{#if:{{{list6|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group6|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group6style|}}}"><!-- -->{{{group6}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list6style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list6}}}</div></td></tr>}}<!-- -->{{#if:{{{list7|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group7|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group7style|}}}"><!-- -->{{{group7}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list7style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list7}}}</div></td></tr>}}<!-- -->{{#if:{{{list8|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group8|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group8style|}}}"><!-- -->{{{group8}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list8style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list8}}}</div></td></tr>}}<!-- -->{{#if:{{{list9|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group9|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group9style|}}}"><!-- -->{{{group9}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list9style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list9}}}</div></td></tr>}}<!-- -->{{#if:{{{list10|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group10|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group10style|}}}"><!-- -->{{{group10}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list10style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list10}}}</div></td></tr>}}<!-- -->{{#if:{{{list11|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group11|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group11style|}}}"><!-- -->{{{group11}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list11style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list11}}}</div></td></tr>}}<!-- -->{{#if:{{{list12|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group12|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group12style|}}}"><!-- -->{{{group12}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list12style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list12}}}</div></td></tr>}}<!-- -->{{#if:{{{list13|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group13|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group13style|}}}"><!-- -->{{{group13}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list13style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list13}}}</div></td></tr>}}<!-- -->{{#if:{{{list14|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group14|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group14style|}}}"><!-- -->{{{group14}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list14style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list14}}}</div></td></tr>}}<!-- -->{{#if:{{{list15|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group15|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group15style|}}}"><!-- -->{{{group15}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list15style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list15}}}</div></td></tr>}}<!-- -->{{#if:{{{list16|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group16|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group16style|}}}"><!-- -->{{{group16}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list16style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list16}}}</div></td></tr>}}<!-- -->{{#if:{{{list17|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group17|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group17style|}}}"><!-- -->{{{group17}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list17style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list17}}}</div></td></tr>}}<!-- -->{{#if:{{{list18|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group18|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group18style|}}}"><!-- -->{{{group18}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list18style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list18}}}</div></td></tr>}}<!-- -->{{#if:{{{list19|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group19|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group19style|}}}"><!-- -->{{{group19}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list19style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list19}}}</div></td></tr>}}<!-- -->{{#if:{{{list20|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group20|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group20style|}}}"><!-- -->{{{group20}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list20style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list20}}}</div></td></tr>}}<!-- -->{{#if:{{{list21|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group21|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group21style|}}}"><!-- -->{{{group21}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list21style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list21}}}</div></td></tr>}}<!-- -->{{#if:{{{list22|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group22|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group22style|}}}"><!-- -->{{{group22}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list22style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list22}}}</div></td></tr>}}<!-- -->{{#if:{{{list23|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group23|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group23style|}}}"><!-- -->{{{group23}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list23style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list23}}}</div></td></tr>}}<!-- -->{{#if:{{{list24|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group24|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group24style|}}}"><!-- -->{{{group24}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list24style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list24}}}</div></td></tr>}}<!-- -->{{#if:{{{list25|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group25|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group25style|}}}"><!-- -->{{{group25}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list25style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list25}}}</div></td></tr>}}<!-- -->{{#if:{{{list26|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group26|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group26style|}}}"><!-- -->{{{group26}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list26style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list26}}}</div></td></tr>}}<!-- -->{{#if:{{{list27|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group27|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group27style|}}}"><!-- -->{{{group27}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list27style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list27}}}</div></td></tr>}}<!-- -->{{#if:{{{list28|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group28|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group28style|}}}"><!-- -->{{{group28}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list28style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list28}}}</div></td></tr>}}<!-- -->{{#if:{{{list29|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group29|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group29style|}}}"><!-- -->{{{group29}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list29style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list29}}}</div></td></tr>}}<!-- -->{{#if:{{{list30|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group30|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group30style|}}}"><!-- -->{{{group30}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list30style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list30}}}</div></td></tr>}}<!-- -->{{#if:{{{list31|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group31|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group31style|}}}"><!-- -->{{{group31}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list31style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list31}}}</div></td></tr>}}<!-- -->{{#if:{{{list32|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group32|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group32style|}}}"><!-- -->{{{group32}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list32style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list32}}}</div></td></tr>}}<!-- -->{{#if:{{{list33|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group33|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group33style|}}}"><!-- -->{{{group33}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list33style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list33}}}</div></td></tr>}}<!-- -->{{#if:{{{list34|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group34|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group34style|}}}"><!-- -->{{{group34}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list34style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list34}}}</div></td></tr>}}<!-- -->{{#if:{{{list35|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group35|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group35style|}}}"><!-- -->{{{group35}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list35style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list35}}}</div></td></tr>}}<!-- -->{{#if:{{{list36|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group36|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group36style|}}}"><!-- -->{{{group36}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list36style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list36}}}</div></td></tr>}}<!-- -->{{#if:{{{list37|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group37|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group37style|}}}"><!-- -->{{{group37}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list37style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list37}}}</div></td></tr>}}<!-- -->{{#if:{{{list38|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group38|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group38style|}}}"><!-- -->{{{group38}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list38style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list38}}}</div></td></tr>}}<!-- -->{{#if:{{{list39|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group39|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group39style|}}}"><!-- -->{{{group39}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list39style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list39}}}</div></td></tr>}}<!-- -->{{#if:{{{list40|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group40|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group40style|}}}"><!-- -->{{{group40}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list40style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list40}}}</div></td></tr>}}<!-- -->{{#if:{{{list41|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group41|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group41style|}}}"><!-- -->{{{group41}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list41style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list41}}}</div></td></tr>}}<!-- -->{{#if:{{{list42|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group42|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group42style|}}}"><!-- -->{{{group42}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list42style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list42}}}</div></td></tr>}}<!-- -->{{#if:{{{list43|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group43|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group43style|}}}"><!-- -->{{{group43}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list43style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list43}}}</div></td></tr>}}<!-- -->{{#if:{{{list44|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group44|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group44style|}}}"><!-- -->{{{group44}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list44style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list44}}}</div></td></tr>}}<!-- -->{{#if:{{{list45|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group45|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group45style|}}}"><!-- -->{{{group45}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list45style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list45}}}</div></td></tr>}}<!-- -->{{#if:{{{list46|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group46|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group46style|}}}"><!-- -->{{{group46}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list46style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list46}}}</div></td></tr>}}<!-- -->{{#if:{{{list47|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group47|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group47style|}}}"><!-- -->{{{group47}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list47style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list47}}}</div></td></tr>}}<!-- -->{{#if:{{{list48|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group48|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group48style|}}}"><!-- -->{{{group48}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list48style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list48}}}</div></td></tr>}}<!-- -->{{#if:{{{list49|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group49|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group49style|}}}"><!-- -->{{{group49}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list49style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list49}}}</div></td></tr>}}<!-- -->{{#if:{{{list50|}}}|<!-- --><tr style="height:2px"><td></td></tr><tr><!-- -->{{#if:{{{group50|}}}|<td class="navbox-group" style="{{{basestyle|}}};<!-- -->padding:{{{grouppadding|0 {{#ifeq:{{{border|{{{1|}}}}}}|subgroup|0.75em|1em}}}}};{{{groupstyle|}}};{{{group50style|}}}"><!-- -->{{{group50}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!-- -->width:100%;padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list50style|}}}" <!-- -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!-- --><div style="padding:{{{listpadding|0 0.25em}}}">{{{list50}}}</div></td></tr>}}<!-- ---Below--- -->{{#if:{{{below|}}}|<!-- -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<tr style="height:2px;"><td></td></tr>}}<!-- --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" <!-- -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{below}}}</td></tr>}}<!-- --></table>{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=<div>|none=|#default=</td></tr></table>}}<!-- --></includeonly><noinclude> {{documentation}} <!-- 请将分类与跨语言链结增加在/doc子页面 / 請將分類與跨語言連結增加在/doc子頁面 --> </noinclude> 961a66db4bef06739d50fecd2c6c51c7544965e9 Template:Navbar 10 81 2048 1774 2023-07-19T03:37:07Z Richard Robin 2 已保护“[[Template:Navbar]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期))[连锁保护] wikitext text/x-wiki <includeonly><!-- -->{{#if:{{{nodiv|}}} |<!--then: -->&nbsp;<span class="noprint plainlinks hlist navbar nomobile" style="{{{style|}}}"> |<!--else: --><div class="noprint plainlinks hlist navbar nomobile" style="{{{style|}}}"><!-- -->}}<!-- -->{{#if:{{{brackets|}}}|&#91;}}{{#ifeq:{{{mini|}}}{{{miniv|}}}{{{plain|}}}{{{viewplain|}}}|<!--equals:-->1 |<!--then:(nothing)--> |<!--else: -->本模板:&nbsp;<!-- -->}}<!-- -->{{#if:{{{mini|}}} |<!--then: -->[[Template:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板">查</span>]]{{·}}[[Template talk:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="关于这个模板的讨论页面">论</span>]]{{·}}[{{fullurl:Template:{{{1}}}|action=edit}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="您可以编辑这个模板。请在储存变更之前先预览">编</span>]{{#if:{{{history|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=history}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看zh-hant:檢視}-这个模板的编辑历史">历</span>]|}}{{#if:{{{purge|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=purge}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="清除这个模板的缓存">清</span>]|}}<!-- -->}}<!-- -->{{#ifeq:{{{miniv|}}}{{{viewplain|}}} |<!--equals:-->1 |<!--then: -->[[Template:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板">v{{#if:{{{viewplain|}}}|iew}}</span>]]<!-- -->|<!--else:(nothing)--> |}}<!-- -->{{#ifeq:{{{mini|}}}{{{miniv|}}}{{{viewplain|}}} |<!--equals:-->1 |<!--then:(nothing)--> |<!--else: -->[[Template:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板>-{zh-hans:查看;zh-hant:檢視}-</span>]]{{·}}[[Template talk:{{{1}}}|<span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="关于这个模板的讨论页面">讨论</span>]]{{·}}[{{fullurl:Template:{{{1}}}|action=edit}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="您可以编辑这个模板,请在储存变更之前先预览。">编辑</span>]{{#if:{{{history|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=history}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="-{zh-hans:查看;zh-hant:檢視}-这个模板的编辑历史">历史</span>]|}}{{#if:{{{purge|}}}|{{·}}[{{fullurl:Template:{{{1}}}|action=purge}} <span style="{{#if:{{{fontstyle|}}}|{{{fontstyle}}}|color:{{{fontcolor|#002bb8}}}}}" title="清除这个模板的缓存">清除缓存</span>]|}}<!-- -->}}<!-- -->{{#if:{{{brackets|}}}|]}}<!-- -->{{#if:{{{nodiv|}}} |<!--then: --></span>&nbsp; |<!--else: --></div><!-- -->}}</includeonly><noinclude> {{模板文件}} <!-- 請將模板的分類與跨語言連結增加在 [[Template:Navbar/doc]] 子頁面 --> </noinclude> db0399c9770ff5b726990512e51ac42a22253e81 Template:可自由使用 10 994 2053 1981 2023-07-19T03:38:19Z Richard Robin 2 已保护“[[Template:可自由使用]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki <table style="font-size: 95%; width: 80%; margin: 0 auto; margin-top: -1px; border: 1px #AAA solid; border-left: 10px ; border-collapse: collapse; background-color: #FFF; color: #000; border-left: 10px solid lightgreen;" class="plainlinks esu-ambox"> <tr> <td style="width: 60px; padding: 2px 0px 2px 0.5em; text-align: center;">[[File:PD-icon.svg|50px|link=]]</td> <td style="padding: 0.5em 0.8em;">由于''{{{1|某种原因}}}'',作者已经放弃著作权,或声明可自由使用。</div> </td> </tr> </table> 815fb0b363e5072099ab5d8535e6156bd7bc8794 Template:MessageBox 10 930 2054 1852 2023-07-19T03:38:38Z Richard Robin 2 已保护“[[Template:MessageBox]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期))[连锁保护] wikitext text/x-wiki <div style="width: {{#if:{{{width|}}}|{{{width}}}|80%}}; background-color: {{#if:{{{Background color}}}|{{{Background color}}}|#f5f5f5}}; border-top: 1px solid {{#if:{{{Border color}}}|{{{Border color}}}|#aaaaaa}}; border-bottom: 1px solid {{#if:{{{Border color}}}|{{{Border color}}}|#aaaaaa}}; border-right: 1px solid {{#if:{{{Border color}}}|{{{Border color}}}|#aaaaaa}}; border-left: 12px solid {{#if:{{{Flag color}}}|{{{Flag color}}}|#aaaaaa}}; margin: 0.5em auto 0.5em;"> {| {{#if:{{{Image}}}|{{!}}style="width:93px; text-align:center; vertical-align:middle; padding-top:1px;padding-bottom:7px" {{!}} {{{Image}}} }} |style="vertical-align:middle;padding-left:3px;padding-top:10px;padding-bottom:10px;padding-right:10px; background-color: {{#if:{{{Background color}}}{{!}}{{{Background color}}}{{!}}#f5f5f5}};" | {{{Message text}}} |} </div><noinclude>[[Category:Notice templates]]</noinclude> c6727bf6179a36a5413ed93f232fd0e2f7180256 Template:欢迎来到海底小纵队沙盒!为了方便他人进行编辑练习,请不要删除本说明模板。 10 933 2055 1857 2023-07-19T03:38:56Z Richard Robin 2 已保护“[[Template:欢迎来到海底小纵队沙盒!为了方便他人进行编辑练习,请不要删除本说明模板。]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki {{header | title = <center>欢迎使用海底小纵队维基专用沙盒!</center> | shortcut = | notes = 沙盒是用于练习页面编辑技巧的测试页面。您可在此随意地进行编辑的练习。完成编辑后,可点击“显示预览”按钮预览内容,也可点击“发布更改”按钮保存内容。就像在沙滩上所写的文字涨潮时就会消失,同样沙盒中所写的内容,随时可能被清空,不会有任何预先通知(但曾保存的内容仍会永久存留在页面的历史记录中)。请注意:<br> * 请不要在公用的沙盒撰写条目或存放其他有价值的内容; * 请不要在沙盒进行广告宣传或刷编辑次数,否则可能会被封禁; * 请不要在此沙盒中编写任何违反所在地法律法规的内容; * 请不要编写有侵犯他人版权、攻击性、诽谤中伤他人或他人隐私的内容; * 为了方便他人进行编辑练习,请不要在使用沙盒时将本说明删除。 网站由于建立时间较短,所以目前先写到这里,可能该说明会有一些增补或删减,但该沙盒的基本说明和其他任何百科的沙盒说明主基调相同。 | topbarhex = 083388 | bodyhex = acc8ff | titlecolor = | bodycolor = }} 7fadeb72c70365c141e7646639e94b2dca82bca9 Template:Mbox 10 835 2056 1853 2023-07-19T03:39:08Z Richard Robin 2 已保护“[[Template:Mbox]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki {| cellspacing="0" width="80%" cellpadding="0" style="padding:5px; margin: 0 auto; border: 1px solid #aaa |- | style="font-size: 100%" | |- | {{#invoke:Message box|mbox}} |}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 9ae3093ee337386913adef22fcb3f477b3d71ef8 Template:Ambox 10 949 2057 1896 2023-07-19T03:40:10Z Richard Robin 2 已保护“[[Template:Ambox]]”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)) wikitext text/x-wiki {{#invoke:Message box|ambox}}{{#ifeq:{{{small}}};{{NAMESPACENUMBER}}|left;0|[[Category:Articles using small message boxes]]}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 0c13ec156138ae0499c998cc3d7fbbeac4aeeed6 首页 0 2 2058 182 2023-07-20T11:55:05Z Richard Robin 2 wikitext text/x-wiki <center><div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <center><big><big><big>欢迎来到海底小纵队中文维基!</big></big></big></center> [[文件:巴克队长、呱唧、帕尼.png|center|600px|link=]] <center><big>本网站意在科普海底小纵队系列所有的剧集、角色、舰艇、出现的海洋生物(不包括同人作品)等相关要素。</big></center> <center><big>该网站刚成立不久,欢迎各位朋友协助我们一起编写。</big></center><br> <center><big><big>目前已编写 '''[[Special:Statistics|{{NUMBEROFARTICLES}}]]''' 个页面。</big></big></center> </div></center> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/最新动态|action=edit}} 编辑]</div>最新动态</div> {{首页/最新动态}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/索引|action=edit}} 编辑]</div>索引</div> {{首页/索引}}</div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/工程|action=edit}} 编辑]</div>工程</div> {{首页/工程}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/相关链接|action=edit}} 编辑]</div>相关链接</div> {{首页/相关链接}} </div> <div style="padding: .3em .4em .4em;border:1px solid #a6dff7;color:#000;background-color:#ddf6ff"> <div style="padding: .3em .4em .3em .2em;margin-bottom:.4em;background:#a6dff7;font-family:Arial,Helvetica,sans-serif;font-weight:bold;font-size:120%;border:1px solid #a3bfb1;text-align:left"><div class="plainlinks" style="float:right;width:5em;text-align:right">[{{SERVER}}{{localurl:Template:首页/友情链接|action=edit}} 编辑]</div>友情链接</div> {{首页/友情链接}}</div> cf8027ea4f0769c5970105d45fc89a62216bae4c 海底小纵队出现的基地和舰艇列表 0 1023 2059 2023-07-20T17:15:23Z Richard Robin 2 创建页面,内容为“*这里可能并没有完全列举已经出现了的(包括动画剧集、绘本和大电影)舰艇。如有遗漏欢迎各位补充。 == 基地 == {| class="wikitable" |- ! 型号 !! 中文名称 !! 简介 |- | octo-pod || [[章鱼堡]] || 建于1983年,海底小纵队所有成员的家,以北太平洋巨型章鱼为原型。<br>它结合了基地总部、发射台、图书馆、实验室、医务室、成员的卧室、厨房和花园舱。<br>是海…” wikitext text/x-wiki *这里可能并没有完全列举已经出现了的(包括动画剧集、绘本和大电影)舰艇。如有遗漏欢迎各位补充。 == 基地 == {| class="wikitable" |- ! 型号 !! 中文名称 !! 简介 |- | octo-pod || [[章鱼堡]] || 建于1983年,海底小纵队所有成员的家,以北太平洋巨型章鱼为原型。<br>它结合了基地总部、发射台、图书馆、实验室、医务室、成员的卧室、厨房和花园舱。<br>是海底小纵队的秘密基地,它可以在海下自由穿梭,是最好的代步工具。 |- | old octo-pod || [[旧章鱼堡]] || 因操作故障而被撞毁,这里也是一只好奇的北太平洋巨型章鱼的家。 |- | —— || [[维修站]] || 制造章鱼实验室的地方,也是停放部分舰艇的地方。 |} == 舰艇 == {| class="wikitable" |- ! 型号 !! 中文名称 !! 简介 |- | GUP-A || [[灯笼鱼艇]] || 造型源于灯笼鱼,用来执行各种任务。 |- | GUP-B || [[虎鲨艇]] || 仅供[[呱唧]]一人驾驶。 |- | GUP-C || [[蓝鲸艇]] || 有救生绳和锚,可以用来破冰。当有舰艇落难时,第一个出动蓝鲸艇。 |- | GUP-D || [[魔鬼鱼艇]] || 有一对钳臂,能伸出八只脚在陆上行动。是[[突突兔]]最喜欢的舰艇,曾被[[谢灵通]]撞坏过两次。 |- | GUP-E || [[孔雀鱼艇]] || 供两人乘坐,可以变成救生艇,后舱可以运载各种物品。 |- | GUP-F || [[小丑鱼艇]] || 是一艘脚蹬艇,没有外壳,不需要电。 |- | GUP-G || [[娃娃鱼艇]] || 出现于海底小纵队大电影《洞穴大冒险》里。 |- | GUP-H || [[蜻蜓直升机]] || 它的六只“脚”可以让它安全降落在地上。 |- | GUP-I || [[水熊虫艇]] || 是一个非常巨大的,可以在陆地上移动的考察站。 |- | GUP-K || [[短吻鳄艇]] || 可以变成越野车,还搭载有两艘电动摩托艇。 |- | GUP-M || [[弹涂鱼摩托车]] || 在海底小纵队大电影《洞穴大冒险》里,有多种型号。 |- | GUP-O || [[虎鲸艇]] || 是一辆雪橇。可在《GUP-S独角鲸艇细节》一短片中看到其蓝图。第四季片尾曲里出现。 |- | GUP-P || [[鹦嘴鱼艇]] || 停放在[[鲸鲨艇]]中。 |- | GUP-Q || [[锤头鲨艇]] || 出现于海底小纵队大电影《洞穴大冒险》里,可分开成食人鱼模式,两只眼睛可变成水下摩托车。 |- | GUP-R || [[旗鱼艇]] || 速度非常快。 |- | GUP-S || [[独角鲸艇]] || 出现于所有雪地情节中,是一艘可以前后分开的舰艇,前面可以在冰上活动,后面可以在冰下活动。<br> [[独角鲸艇]]的角有加热功能,因此可以破冰。因为有[[突突兔]]的防冻装置,所以不会冻上。 |- | GUP-T || [[海猪救援车]] || 第四季每集ED出现,具体出现集数未知(现有剧情未出现)。 |- | GUP-U || [[躄鱼艇]] || 第四季每集ED出现,具体出现集数未知(现有剧情未出现)。 |- | GUP-V || [[植物鱼艇]] || 由[[植物鱼]]改装的舰艇,原本是一辆圣诞玩具火车,有一个吸尘器,非常适合救人。出现于《植物鱼圣诞节》。 |- | GUP-W || [[鲸鲨艇]] || 造型源于鲸鲨,可以转换为珊瑚礁模式。 |- | GUP-X || [[马蹄蟹艇]] || 是一艘可以分为水上滑板和滑翔机的舰艇。有履带,能在陆上行动。可以一分为三。<br>在《圣诞大营救》里是[[突突兔]]当成圣诞礼物送给了[[巴克队长]]。 |- | GUP-Y || [[雪人蟹艇]] || 第四季每集ED出现,具体出现集数未知(现有剧情未出现)。 |- | GUP-Z || [[火山虾艇]] || 出现于海底小纵队大电影[[海底小纵队大电影1 火焰之环|《火焰之环》]]里,是五艘小舰艇。<br>可以合体或转换为螳螂虾模式,能量耗尽后会自动解体。 |- | OCTO-Ⅱ || [[深海章鱼实验室]] || 放置在海沟里,出现于《马里亚纳海沟》中。 |- | OCTO-BUGGY || [[章鱼勘探车]] || 放置于[[深海章鱼实验室]]。出现于《马里亚纳海沟》中。 |} (更多内容待补充) d69cc0c6b04d519c5facf8337c9b378f568e3997 Template:首页/索引 10 101 2060 155 2023-07-20T17:16:49Z Richard Robin 2 wikitext text/x-wiki *[[海底小纵队|海底小纵队是什么?]] *[https://octonauts.miraheze.org/wiki/Category:海底小纵队成员 海底小纵队成员] *[https://octonauts.miraheze.org/wiki/Category:剧集 海底小纵队剧集] *[[海底小纵队出现的基地和舰艇列表]] 7303e09e60def62d5348f20320ffcf024560d7c0